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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Return an error in the registered handler if the device can't be powered
on.

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux