From: Markus Elfring Date: Sun, 5 Jul 2015 19:55:10 +0000 (+0200) Subject: GPU-DRM: Delete an unnecessary check before drm_property_unreference_blob() X-Git-Tag: Ubuntu-5.13.0-19.19~17317^2~36^2~110 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ec530829ed064bc63d260f309e3ef88e0764132b;p=mirror_ubuntu-jammy-kernel.git GPU-DRM: Delete an unnecessary check before drm_property_unreference_blob() The drm_property_unreference_blob() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Zhao Junwang Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index b69ed97d447c..79fe31e5851e 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -4469,9 +4469,7 @@ static int drm_property_replace_global_blob(struct drm_device *dev, goto err_created; } - if (old_blob) - drm_property_unreference_blob(old_blob); - + drm_property_unreference_blob(old_blob); *replace = new_blob; return 0;