From: Sachin Kamat Date: Mon, 19 Nov 2012 09:44:56 +0000 (+0000) Subject: drm/crtc: Remove redundant NULL check before kfree X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e1c156ff04b1920c33b59c5b8564afc8bf4f2cd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/crtc: Remove redundant NULL check before kfree kfree() on a NULL input is a no-op. Hence remove the check. Signed-off-by: Sachin Kamat Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 7ac3952f74fc..9fd0c3555c30 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -470,10 +470,8 @@ void drm_crtc_cleanup(struct drm_crtc *crtc) { struct drm_device *dev = crtc->dev; - if (crtc->gamma_store) { - kfree(crtc->gamma_store); - crtc->gamma_store = NULL; - } + kfree(crtc->gamma_store); + crtc->gamma_store = NULL; drm_mode_object_put(dev, &crtc->base); list_del(&crtc->head);