[media] media: i2c/adp1653: probe: fix erroneous return value
authorAnton Protopopov <a.s.protopopov@gmail.com>
Sun, 7 Feb 2016 04:27:32 +0000 (02:27 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 10 Feb 2016 11:27:29 +0000 (09:27 -0200)
The adp1653_probe() function may return positive value EINVAL
which is obviously wrong.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/i2c/adp1653.c

index 7e9cbf7..fb7ed73 100644 (file)
@@ -497,7 +497,7 @@ static int adp1653_probe(struct i2c_client *client,
                if (!client->dev.platform_data) {
                        dev_err(&client->dev,
                                "Neither DT not platform data provided\n");
-                       return EINVAL;
+                       return -EINVAL;
                }
                flash->platform_data = client->dev.platform_data;
        }