drm/i2c: tda998x: Remove useless test
authorJean-Francois Moine <moinejf@free.fr>
Mon, 7 Jul 2014 15:59:51 +0000 (17:59 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 22 Jul 2014 01:27:46 +0000 (11:27 +1000)
In tda998x_encoder_destroy(), priv->cec is never NULL, so,
remove its test.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/i2c/tda998x_drv.c

index ac357b02bd35c16862f3325b5c51be62ccf2465f..a8f1e03bd1f54c16db6407a5baced901007c09b7 100644 (file)
@@ -1196,8 +1196,7 @@ tda998x_encoder_destroy(struct drm_encoder *encoder)
        if (priv->hdmi->irq)
                free_irq(priv->hdmi->irq, priv);
 
-       if (priv->cec)
-               i2c_unregister_device(priv->cec);
+       i2c_unregister_device(priv->cec);
        drm_i2c_encoder_destroy(encoder);
        kfree(priv);
 }