Re: [PATCH] bus: mhi: core: Fix error handling in mhi_register_controller()

2020-12-01 Thread Manivannan Sadhasivam
On Tue, Dec 01, 2020 at 10:02:54AM +0300, Dan Carpenter wrote: > There are a few problems with the error handling in this function. They > mostly center around the alloc_ordered_workqueue() allocation. > 1) If that allocation fails or if the kcalloc() prior to it fails then > it leads to a NULL

Re: [PATCH] bus: mhi: core: Fix error handling in mhi_register_controller()

2020-12-01 Thread Manivannan Sadhasivam
On Tue, Dec 01, 2020 at 10:02:54AM +0300, Dan Carpenter wrote: > There are a few problems with the error handling in this function. They > mostly center around the alloc_ordered_workqueue() allocation. > 1) If that allocation fails or if the kcalloc() prior to it fails then > it leads to a NULL

Re: [PATCH] bus: mhi: core: Fix error handling in mhi_register_controller()

2020-11-30 Thread Loic Poulain
On Tue, 1 Dec 2020 at 08:05, Dan Carpenter wrote: > > There are a few problems with the error handling in this function. They > mostly center around the alloc_ordered_workqueue() allocation. > 1) If that allocation fails or if the kcalloc() prior to it fails then > it leads to a NULL dereference

[PATCH] bus: mhi: core: Fix error handling in mhi_register_controller()

2020-11-30 Thread Dan Carpenter
There are a few problems with the error handling in this function. They mostly center around the alloc_ordered_workqueue() allocation. 1) If that allocation fails or if the kcalloc() prior to it fails then it leads to a NULL dereference when we call destroy_workqueue(mhi_cntrl->hiprio_wq). 2) The