The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] dvb-usb/gp8psk.c: return -errno rather than errno
@ 2008-05-27  8:01 Li Zefan
  2008-05-27 15:03 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: Li Zefan @ 2008-05-27  8:01 UTC (permalink / raw)
  To: mchehab; +Cc: Andrew Morton, LKML, video4linux-list

gp8psk_power_ctrl() returns -EINVAL in some failing paths, but
returns EINVAL in some other paths.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.cn>
---
 drivers/media/dvb/dvb-usb/gp8psk.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c
index 9a942af..2653120 100644
--- a/drivers/media/dvb/dvb-usb/gp8psk.c
+++ b/drivers/media/dvb/dvb-usb/gp8psk.c
@@ -146,24 +146,24 @@ static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff)
 		if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM)
 			if (! (status & bm8pskFW_Loaded)) /* BCM4500 firmware loaded */
 				if(gp8psk_load_bcm4500fw(d))
-					return EINVAL;
+					return -EINVAL;
 
 		if (! (status & bmIntersilOn)) /* LNB Power */
 			if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0,
 					&buf, 1))
-				return EINVAL;
+				return -EINVAL;
 
 		/* Set DVB mode to 1 */
 		if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM)
 			if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0))
-				return EINVAL;
+				return -EINVAL;
 		/* Abort possible TS (if previous tune crashed) */
 		if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0))
-			return EINVAL;
+			return -EINVAL;
 	} else {
 		/* Turn off LNB power */
 		if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1))
-			return EINVAL;
+			return -EINVAL;
 		/* Turn off 8psk power */
 		if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1))
 			return -EINVAL;
-- 1.5.4.rc3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dvb-usb/gp8psk.c: return -errno rather than errno
  2008-05-27  8:01 [PATCH] dvb-usb/gp8psk.c: return -errno rather than errno Li Zefan
@ 2008-05-27 15:03 ` Mauro Carvalho Chehab
  2008-05-28  0:58   ` Li Zefan
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2008-05-27 15:03 UTC (permalink / raw)
  To: Li Zefan; +Cc: Andrew Morton, LKML, video4linux-list

On Tue, 27 May 2008 16:01:21 +0800
Li Zefan <lizf@cn.fujitsu.com> wrote:

> gp8psk_power_ctrl() returns -EINVAL in some failing paths, but
> returns EINVAL in some other paths.
> 
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.cn>
> ---
Thanks Li. However, I've committed a few days ago a similar patch from Marcin.


Cheers,
Mauro

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dvb-usb/gp8psk.c: return -errno rather than errno
  2008-05-27 15:03 ` Mauro Carvalho Chehab
@ 2008-05-28  0:58   ` Li Zefan
  0 siblings, 0 replies; 3+ messages in thread
From: Li Zefan @ 2008-05-28  0:58 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Andrew Morton, LKML, video4linux-list

Mauro Carvalho Chehab wrote:
> On Tue, 27 May 2008 16:01:21 +0800
> Li Zefan <lizf@cn.fujitsu.com> wrote:
> 
>> gp8psk_power_ctrl() returns -EINVAL in some failing paths, but
>> returns EINVAL in some other paths.
>>
>> Signed-off-by: Li Zefan <lizf@cn.fujitsu.cn>
>> ---
> Thanks Li. However, I've committed a few days ago a similar patch from Marcin.
> 

Good to know this. :)

> 
> Cheers,
> Mauro
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-28  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-27  8:01 [PATCH] dvb-usb/gp8psk.c: return -errno rather than errno Li Zefan
2008-05-27 15:03 ` Mauro Carvalho Chehab
2008-05-28  0:58   ` Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox