GIT_AUTHOR_DATE=
1416486805
The functions pvr2_hdw_destroy(), rc_unregister_device() and vfree() perform
also input parameter validation. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
        if (!ir)
                return;
 
-       if (ir->rc)
-               rc_unregister_device(ir->rc);
+       rc_unregister_device(ir->rc);
 
        /* done */
        kfree(ir);
 
        if (!ir)
                goto ref_put;
 
-       if (ir->rc)
-               rc_unregister_device(ir->rc);
+       rc_unregister_device(ir->rc);
 
        kfree(ir->i2c_client);
 
 
 static void pvr2_context_destroy(struct pvr2_context *mp)
 {
        pvr2_trace(PVR2_TRACE_CTXT,"pvr2_context %p (destroy)",mp);
-       if (mp->hdw) pvr2_hdw_destroy(mp->hdw);
+       pvr2_hdw_destroy(mp->hdw);
        pvr2_context_set_notify(mp, 0);
        mutex_lock(&pvr2_context_mutex);
        if (mp->exist_next) {
 
 {
        unsigned long i;
        for (i = 0; i < SYS_FRAMES; i++) {
-               if (vc->buffer.frame[i].lpvbits)
-                       vfree(vc->buffer.frame[i].lpvbits);
+               vfree(vc->buffer.frame[i].lpvbits);
                vc->buffer.frame[i].lpvbits = NULL;
        }
        return 0;