Re: [PATCH] btusb: fix overflow return values

2013-07-09 Thread Gustavo Padovan
Hi Adam, * Adam Lee [2013-07-09 10:55:01 +0800]: > On Mon, Jul 08, 2013 at 11:50:54AM -0700, Marcel Holtmann wrote: > > Hi Adam, > > > > > PTR_ERR() returns a long type value, but btusb_setup_intel() and > > > btusb_setup_intel_patching() should return an int type value. > > > > > > This bug

Re: [PATCH] btusb: fix overflow return values

2013-07-09 Thread Adam Lee
On Tue, Jul 09, 2013 at 10:55:01AM +0800, Adam Lee wrote: > On Mon, Jul 08, 2013 at 11:50:54AM -0700, Marcel Holtmann wrote: > > Hi Adam, > > > > > PTR_ERR() returns a long type value, but btusb_setup_intel() and > > > btusb_setup_intel_patching() should return an int type value. > > > > > >

Re: [PATCH] btusb: fix overflow return values

2013-07-09 Thread Adam Lee
On Tue, Jul 09, 2013 at 10:55:01AM +0800, Adam Lee wrote: On Mon, Jul 08, 2013 at 11:50:54AM -0700, Marcel Holtmann wrote: Hi Adam, PTR_ERR() returns a long type value, but btusb_setup_intel() and btusb_setup_intel_patching() should return an int type value. This bug makes the

Re: [PATCH] btusb: fix overflow return values

2013-07-09 Thread Gustavo Padovan
Hi Adam, * Adam Lee adam@canonical.com [2013-07-09 10:55:01 +0800]: On Mon, Jul 08, 2013 at 11:50:54AM -0700, Marcel Holtmann wrote: Hi Adam, PTR_ERR() returns a long type value, but btusb_setup_intel() and btusb_setup_intel_patching() should return an int type value. This

Re: [PATCH] btusb: fix overflow return values

2013-07-08 Thread Adam Lee
On Mon, Jul 08, 2013 at 11:50:54AM -0700, Marcel Holtmann wrote: > Hi Adam, > > > PTR_ERR() returns a long type value, but btusb_setup_intel() and > > btusb_setup_intel_patching() should return an int type value. > > > > This bug makes the judgement "if (ret < 0)" not working on x86_64 > >

Re: [PATCH] btusb: fix overflow return values

2013-07-08 Thread Marcel Holtmann
Hi Adam, > PTR_ERR() returns a long type value, but btusb_setup_intel() and > btusb_setup_intel_patching() should return an int type value. > > This bug makes the judgement "if (ret < 0)" not working on x86_64 > architecture systems, leading to failure as below, even panic. > > [ 12.958920]

Re: [PATCH] btusb: fix overflow return values

2013-07-08 Thread Marcel Holtmann
Hi Adam, PTR_ERR() returns a long type value, but btusb_setup_intel() and btusb_setup_intel_patching() should return an int type value. This bug makes the judgement if (ret 0) not working on x86_64 architecture systems, leading to failure as below, even panic. [ 12.958920] Bluetooth:

Re: [PATCH] btusb: fix overflow return values

2013-07-08 Thread Adam Lee
On Mon, Jul 08, 2013 at 11:50:54AM -0700, Marcel Holtmann wrote: Hi Adam, PTR_ERR() returns a long type value, but btusb_setup_intel() and btusb_setup_intel_patching() should return an int type value. This bug makes the judgement if (ret 0) not working on x86_64 architecture

Re: [PATCH] btusb: fix overflow return values

2013-07-04 Thread Adam Lee
On Fri, Jul 05, 2013 at 10:59:47AM +0800, Adam Lee wrote: > On Fri, Jul 05, 2013 at 10:37:07AM +0800, Yang Bai wrote: > > The return value of btusb_setup_intel is compared with 0. Code as: > > > > drivers/bluetooth/btusb.c: > > static int btusb_probe(struct usb_interface *intf, > > const struct

Re: [PATCH] btusb: fix overflow return values

2013-07-04 Thread Adam Lee
On Fri, Jul 05, 2013 at 10:37:07AM +0800, Yang Bai wrote: > The return value of btusb_setup_intel is compared with 0. Code as: > > drivers/bluetooth/btusb.c: > static int btusb_probe(struct usb_interface *intf, > const struct usb_device_id *id) > if (id->driver_info & BTUSB_INTEL) > hdev->setup =

Re: [PATCH] btusb: fix overflow return values

2013-07-04 Thread Yang Bai
Resend without HTML format. The return value of btusb_setup_intel is compared with 0. Code as: drivers/bluetooth/btusb.c: static int btusb_probe(struct usb_interface *intf, const struct usb_device_id *id) { if (id->driver_info & BTUSB_INTEL) hdev->setup = btusb_setup_intel; }

[PATCH] btusb: fix overflow return values

2013-07-04 Thread Adam Lee
PTR_ERR() returns a long type value, but btusb_setup_intel() and btusb_setup_intel_patching() should return an int type value. This bug makes the judgement "if (ret < 0)" not working on x86_64 architecture systems, leading to failure as below, even panic. [ 12.958920] Bluetooth: hci0 command

[PATCH] btusb: fix overflow return values

2013-07-04 Thread Adam Lee
PTR_ERR() returns a long type value, but btusb_setup_intel() and btusb_setup_intel_patching() should return an int type value. This bug makes the judgement if (ret 0) not working on x86_64 architecture systems, leading to failure as below, even panic. [ 12.958920] Bluetooth: hci0 command

Re: [PATCH] btusb: fix overflow return values

2013-07-04 Thread Yang Bai
Resend without HTML format. The return value of btusb_setup_intel is compared with 0. Code as: drivers/bluetooth/btusb.c: static int btusb_probe(struct usb_interface *intf, const struct usb_device_id *id) { if (id-driver_info BTUSB_INTEL) hdev-setup = btusb_setup_intel; }

Re: [PATCH] btusb: fix overflow return values

2013-07-04 Thread Adam Lee
On Fri, Jul 05, 2013 at 10:37:07AM +0800, Yang Bai wrote: The return value of btusb_setup_intel is compared with 0. Code as: drivers/bluetooth/btusb.c: static int btusb_probe(struct usb_interface *intf, const struct usb_device_id *id) if (id-driver_info BTUSB_INTEL) hdev-setup =

Re: [PATCH] btusb: fix overflow return values

2013-07-04 Thread Adam Lee
On Fri, Jul 05, 2013 at 10:59:47AM +0800, Adam Lee wrote: On Fri, Jul 05, 2013 at 10:37:07AM +0800, Yang Bai wrote: The return value of btusb_setup_intel is compared with 0. Code as: drivers/bluetooth/btusb.c: static int btusb_probe(struct usb_interface *intf, const struct