[PATCH 2/3] V4L: stk11xx, use retval from stk11xx_check_device

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

 



stk11xx, use retval from stk11xx_check_device

stk11xx_check_device returns 0 for success of non-inited device, 1 for
success of inited device and negative for error cases. bubble the negative
value to the caller.

Signed-off-by: Jiri Slaby <[email protected]>

---
commit 95de679efc8c9fbd13121f3fbe4144196a66f387
tree bdc82d59c4ea9ec96abdde81209cb319d71192b6
parent addcd116df57eaca525a1c827efdd5bf3e61b7b5
author Jiri Slaby <[email protected]> Tue, 28 Aug 2007 09:55:20 +0200
committer Jiri Slaby <[email protected]> Tue, 28 Aug 2007 09:55:20 +0200

 drivers/media/video/stk1125.c  |    2 +-
 drivers/media/video/stk1135.c  |    2 +-
 drivers/media/video/stkdcnew.c |    3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/stk1125.c b/drivers/media/video/stk1125.c
index 2429225..f12030d 100644
--- a/drivers/media/video/stk1125.c
+++ b/drivers/media/video/stk1125.c
@@ -91,7 +91,7 @@ static int stk1125_load_microcode(struct stk11xx *dev)
 		retok = stk11xx_check_device(dev, 500);
 		if (retok != 1) {
 			dev_err(&dev->udev->dev, "load microcode fail\n");
-			return -EIO;
+			return retok < 0 ? retok : -EIO;
 		}
 
 		stk11xx_write_reg(dev, 0x02ff, 0x00);
diff --git a/drivers/media/video/stk1135.c b/drivers/media/video/stk1135.c
index 9acd951..cba95e0 100644
--- a/drivers/media/video/stk1135.c
+++ b/drivers/media/video/stk1135.c
@@ -64,7 +64,7 @@ static int stk1135_load_microcode(struct stk11xx *dev)
 		retok = stk11xx_check_device(dev, 500);
 		if (retok != 1) {
 			dev_err(&dev->udev->dev, "load microcode failed\n");
-			return -EIO;
+			return retok < 0 ? retok : -EIO;
 		}
 
 		stk11xx_write_reg(dev, 0x02ff, 0x00);
diff --git a/drivers/media/video/stkdcnew.c b/drivers/media/video/stkdcnew.c
index 52513e2..00176f2 100644
--- a/drivers/media/video/stkdcnew.c
+++ b/drivers/media/video/stkdcnew.c
@@ -102,10 +102,9 @@ static int stkdcnew_load_microcode(struct stk11xx *dev)
 		stk11xx_write_reg(dev, 0x0200, 0x01);
 
 		retok = stk11xx_check_device(dev, 500);
-
 		if (retok != 1) {
 			dev_err(&dev->udev->dev, "load microcode fail!\n");
-			return -EIO;
+			return retok < 0 ? retok : -EIO;
 		}
 
 		stk11xx_write_reg(dev, 0x02ff, 0x00);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux