[PATCH] as3645a: Handle power on errors when registering the device

2011-12-07 Thread Laurent Pinchart
Return an error in the registered handler if the device can't be powered
on.

Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 drivers/media/video/as3645a.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Hi everybody,

This patch applies on top of the as3645a driver that I'm going to submit for
v3.3. In order to make review easier I'm sending it separately, I will then
squash it into the driver for submission.

diff --git a/drivers/media/video/as3645a.c b/drivers/media/video/as3645a.c
index d583a9c..f7c3178 100644
--- a/drivers/media/video/as3645a.c
+++ b/drivers/media/video/as3645a.c
@@ -557,7 +557,9 @@ static int as3645a_registered(struct v4l2_subdev *sd)
/* Power up the flash driver and read manufacturer ID, model ID, RFU
 * and version.
 */
-   as3645a_set_power(flash-subdev, 1);
+   rval = as3645a_set_power(flash-subdev, 1);
+   if (rval  0)
+   return rval;
 
rval = as3645a_read(flash, AS_DESIGN_INFO_REG);
if (rval  0)
-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] as3645a: Handle power on errors when registering the device

2011-12-07 Thread Sakari Ailus
Hi Laurent,

On Wed, Dec 07, 2011 at 02:27:40PM +0100, Laurent Pinchart wrote:
 Return an error in the registered handler if the device can't be powered
 on.
 
 Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

Thanks for the patch!

Acked-by: Sakari Ailus sakari.ai...@iki.fi

-- 
Sakari Ailus
e-mail: sakari.ai...@iki.fi jabber/XMPP/Gmail: sai...@retiisi.org.uk
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html