mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: i2c/adp1653: probe: fix erroneous return value
@ 2016-02-07  4:27 Anton Protopopov
  2016-02-07 18:08 ` Sakari Ailus
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Protopopov @ 2016-02-07  4:27 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel, Anton Protopopov

The adp1653_probe() function may return positive value EINVAL
which is obviously wrong.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
---
 drivers/media/i2c/adp1653.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c
index 7e9cbf7..fb7ed73 100644
--- a/drivers/media/i2c/adp1653.c
+++ b/drivers/media/i2c/adp1653.c
@@ -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;
 	}
-- 
2.1.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-07 18:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-07  4:27 [PATCH] media: i2c/adp1653: probe: fix erroneous return value Anton Protopopov
2016-02-07 18:08 ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®