Re: [PATCH] usb: hub: Minor refactoring in usb_hub_init()

2019-09-25 Thread Austin Kim
> If you really want to fix up this subroutine, you could change the two > "return -1" statements. They should return an appropriate error code, > not just -1. > > Alan Stern > Thanks for valuable feedback over the patch. If I generate new patch later, let me make sure to contain an appropriate e

Re: [PATCH] usb: hub: Minor refactoring in usb_hub_init()

2019-09-23 Thread Alan Stern
On Mon, 23 Sep 2019, Greg KH wrote: > On Mon, Sep 23, 2019 at 03:19:21PM +0900, Austin Kim wrote: > > Normally when creation of workqueue fails, exception handling takes place > > after the call to alloc_workqueue() is made. > > > > But looking into usb_hub_init() function, 'return 0' statement i

Re: [PATCH] usb: hub: Minor refactoring in usb_hub_init()

2019-09-23 Thread Greg KH
On Mon, Sep 23, 2019 at 03:19:21PM +0900, Austin Kim wrote: > Normally when creation of workqueue fails, exception handling takes place > after the call to alloc_workqueue() is made. > > But looking into usb_hub_init() function, 'return 0' statement is executed, > when alloc_workqueue() returns va

[PATCH] usb: hub: Minor refactoring in usb_hub_init()

2019-09-22 Thread Austin Kim
Normally when creation of workqueue fails, exception handling takes place after the call to alloc_workqueue() is made. But looking into usb_hub_init() function, 'return 0' statement is executed, when alloc_workqueue() returns valid workqueue pointer. if (hub_wq) return 0; Th