[media] USB: Deletion of unnecessary checks before three function calls
[pandora-kernel.git] / drivers / media / usb / em28xx / em28xx-input.c
index 581f6da..85ac7dd 100644 (file)
@@ -712,8 +712,10 @@ static int em28xx_ir_init(struct em28xx *dev)
        em28xx_info("Registering input extension\n");
 
        ir = kzalloc(sizeof(*ir), GFP_KERNEL);
+       if (!ir)
+               return -ENOMEM;
        rc = rc_allocate_device();
-       if (!ir || !rc)
+       if (!rc)
                goto error;
 
        /* record handles to ourself */
@@ -839,8 +841,7 @@ static int em28xx_ir_fini(struct em28xx *dev)
        if (!ir)
                goto ref_put;
 
-       if (ir->rc)
-               rc_unregister_device(ir->rc);
+       rc_unregister_device(ir->rc);
 
        kfree(ir->i2c_client);