* [PATCH] adp1653: check error code of adp1653_init_controls
@ 2011-07-27 7:58 Andy Shevchenko
2011-07-27 8:15 ` Sakari Ailus
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2011-07-27 7:58 UTC (permalink / raw)
To: linux-media, linux-kernel
Cc: Andy Shevchenko, Mauro Carvalho Chehab, Sakari Ailus
Potentially the adp1653_init_controls could return an error. In our case the
error was ignored, meanwhile it means incorrect initialization of V4L2
controls.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
---
drivers/media/video/adp1653.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/adp1653.c b/drivers/media/video/adp1653.c
index 8ad89ff..3379e6d 100644
--- a/drivers/media/video/adp1653.c
+++ b/drivers/media/video/adp1653.c
@@ -429,7 +429,11 @@ static int adp1653_probe(struct i2c_client *client,
flash->subdev.internal_ops = &adp1653_internal_ops;
flash->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
- adp1653_init_controls(flash);
+ ret = adp1653_init_controls(flash);
+ if (ret) {
+ kfree(flash);
+ return ret;
+ }
ret = media_entity_init(&flash->subdev.entity, 0, NULL, 0);
if (ret < 0)
--
1.7.5.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] adp1653: check error code of adp1653_init_controls
2011-07-27 7:58 [PATCH] adp1653: check error code of adp1653_init_controls Andy Shevchenko
@ 2011-07-27 8:15 ` Sakari Ailus
0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2011-07-27 8:15 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-media, linux-kernel, Mauro Carvalho Chehab
On Wed, Jul 27, 2011 at 10:58:02AM +0300, Andy Shevchenko wrote:
> Potentially the adp1653_init_controls could return an error. In our case the
> error was ignored, meanwhile it means incorrect initialization of V4L2
> controls.
Hi, Andy!
Many thanks for the another patch! I'll add this to my next pull req as
well.
Just FYI: As this is clearly a regular patch for the V4L2 subsystem, I think
cc'ing the linux-kernel list isn't necessary.
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
> Cc: Sakari Ailus <sakari.ailus@iki.fi>
> ---
> drivers/media/video/adp1653.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/video/adp1653.c b/drivers/media/video/adp1653.c
> index 8ad89ff..3379e6d 100644
> --- a/drivers/media/video/adp1653.c
> +++ b/drivers/media/video/adp1653.c
> @@ -429,7 +429,11 @@ static int adp1653_probe(struct i2c_client *client,
> flash->subdev.internal_ops = &adp1653_internal_ops;
> flash->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
>
> - adp1653_init_controls(flash);
> + ret = adp1653_init_controls(flash);
> + if (ret) {
> + kfree(flash);
> + return ret;
> + }
>
> ret = media_entity_init(&flash->subdev.entity, 0, NULL, 0);
> if (ret < 0)
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers,
--
Sakari Ailus
sakari.ailus@iki.fi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-27 8:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 7:58 [PATCH] adp1653: check error code of adp1653_init_controls Andy Shevchenko
2011-07-27 8:15 ` 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®