Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1328406 > unrolled thread
| Started by | Anton Protopopov <a.s.protopopov@gmail.com> |
|---|---|
| First post | 2016-02-07 05:30 +0100 |
| Last post | 2016-02-07 19:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] media: i2c/adp1653: probe: fix erroneous return value Anton Protopopov <a.s.protopopov@gmail.com> - 2016-02-07 05:30 +0100
Re: [PATCH] media: i2c/adp1653: probe: fix erroneous return value Sakari Ailus <sakari.ailus@iki.fi> - 2016-02-07 19:10 +0100
| From | Anton Protopopov <a.s.protopopov@gmail.com> |
|---|---|
| Date | 2016-02-07 05:30 +0100 |
| Subject | [PATCH] media: i2c/adp1653: probe: fix erroneous return value |
| Message-ID | <qZp90-Ny-9@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Sakari Ailus <sakari.ailus@iki.fi> |
|---|---|
| Date | 2016-02-07 19:10 +0100 |
| Message-ID | <qZBWy-1se-13@gated-at.bofh.it> |
| In reply to | #1328406 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web