summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-11-19 09:44:56 +0000
committerDave Airlie <airlied@redhat.com>2012-11-20 15:40:46 +1000
commit9e1c156ff04b1920c33b59c5b8564afc8bf4f2cd (patch)
treedc60e31a361d588831482436966246d2ea2056df
parente3cc3520dc2f554b9686b8fc5773d8b8bc8e9c9a (diff)
downloadblackbird-op-linux-9e1c156ff04b1920c33b59c5b8564afc8bf4f2cd.tar.gz
blackbird-op-linux-9e1c156ff04b1920c33b59c5b8564afc8bf4f2cd.zip
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 <sachin.kamat@linaro.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_crtc.c6
1 files changed, 2 insertions, 4 deletions
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);
OpenPOWER on IntegriCloud