Merge remote-tracking branch 'lightnvm/for-next'
[deliverable/linux.git] / drivers / media / v4l2-core / v4l2-device.c
index 06fa5f1b2cfffa833a54cc6eb6584cb0dbaa4be7..62bbed76dbbc401bda8413ec94cc5cf4d065f5de 100644 (file)
@@ -160,12 +160,9 @@ int v4l2_device_register_subdev(struct v4l2_device *v4l2_dev,
        int err;
 
        /* Check for valid input */
-       if (v4l2_dev == NULL || sd == NULL || !sd->name[0])
+       if (!v4l2_dev || !sd || sd->v4l2_dev || !sd->name[0])
                return -EINVAL;
 
-       /* Warn if we apparently re-register a subdev */
-       WARN_ON(sd->v4l2_dev != NULL);
-
        /*
         * The reason to acquire the module here is to avoid unloading
         * a module of sub-device which is registered to a media
This page took 0.026517 seconds and 5 git commands to generate.