Merge tag 'mmc-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
[cascardo/linux.git] / drivers / media / v4l2-core / v4l2-common.c
index 5b80850..57cfe26 100644 (file)
@@ -291,7 +291,7 @@ struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev,
 error:
        /* If we have a client but no subdev, then something went wrong and
           we must unregister the client. */
-       if (spi && sd == NULL)
+       if (!sd)
                spi_unregister_device(spi);
 
        return sd;