* [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 related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: i2c/adp1653: probe: fix erroneous return value
2016-02-07 4:27 [PATCH] media: i2c/adp1653: probe: fix erroneous return value Anton Protopopov
@ 2016-02-07 18:08 ` Sakari Ailus
0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2016-02-07 18:08 UTC (permalink / raw)
To: Anton Protopopov; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel
Hi Anton,
On Sat, Feb 06, 2016 at 11:27:32PM -0500, Anton Protopopov wrote:
> 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;
> }
Thanks!
Applied to my tree.
--
Kind regards,
Sakari Ailus
e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk
^ 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;
as well as URLs for NNTP newsgroup(s).