* [PATCH] Input: wacom - fix error return code in wacom_probe()
@ 2013-08-23 2:53 Wei Yongjun
2013-08-24 23:41 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-08-23 2:53 UTC (permalink / raw)
To: dmitry.torokhov, killertofu, pinglinux, chris, fengguang.wu
Cc: yongjun_wei, linux-input
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Fix to return a negative error code from the urb submit error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/input/tablet/wacom_sys.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index aaf23ae..7eeac61 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -1366,7 +1366,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
usb_set_intfdata(intf, wacom);
if (features->quirks & WACOM_QUIRK_MONITOR) {
- if (usb_submit_urb(wacom->irq, GFP_KERNEL))
+ error = usb_submit_urb(wacom->irq, GFP_KERNEL);
+ if (error)
goto fail5;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: wacom - fix error return code in wacom_probe()
2013-08-23 2:53 [PATCH] Input: wacom - fix error return code in wacom_probe() Wei Yongjun
@ 2013-08-24 23:41 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2013-08-24 23:41 UTC (permalink / raw)
To: Wei Yongjun
Cc: killertofu, pinglinux, chris, fengguang.wu, yongjun_wei,
linux-input
Hi Wei,
On Fri, Aug 23, 2013 at 10:53:00AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return a negative error code from the urb submit error
> handling case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/input/tablet/wacom_sys.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
> index aaf23ae..7eeac61 100644
> --- a/drivers/input/tablet/wacom_sys.c
> +++ b/drivers/input/tablet/wacom_sys.c
> @@ -1366,7 +1366,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
> usb_set_intfdata(intf, wacom);
>
> if (features->quirks & WACOM_QUIRK_MONITOR) {
> - if (usb_submit_urb(wacom->irq, GFP_KERNEL))
> + error = usb_submit_urb(wacom->irq, GFP_KERNEL);
> + if (error)
> goto fail5;
> }
If I remember correctly usb_submit_urb() uses errno definitions in a
creative way, so returning them verbatim to the upper layers is not teh
beset solution. I will change this to return -EIO instead.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-24 23:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23 2:53 [PATCH] Input: wacom - fix error return code in wacom_probe() Wei Yongjun
2013-08-24 23:41 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).