Re: [PATCH] usb: dwc3: Fix dereferencing of null dwc->usb_psy

2021-03-03 Thread Colin Ian King
On 03/03/2021 21:29, Heiko Thiery wrote: > Hi all, > >> On Wed, Mar 3, 2021 at 6:00 PM Colin King wrote: >>> >>> From: Colin Ian King >>> >>> Currently the null check logic on dwc->usb_psy is inverted as it allows >>> calls to power_supply_put with a null dwc->usb_psy causing a null >>> pointer

Re: [PATCH] usb: dwc3: Fix dereferencing of null dwc->usb_psy

2021-03-03 Thread Heiko Thiery
Hi all, > On Wed, Mar 3, 2021 at 6:00 PM Colin King wrote: >> >> From: Colin Ian King >> >> Currently the null check logic on dwc->usb_psy is inverted as it allows >> calls to power_supply_put with a null dwc->usb_psy causing a null >> pointer dereference. Fix this by removing the ! operator. >>

Re: [PATCH] usb: dwc3: Fix dereferencing of null dwc->usb_psy

2021-03-03 Thread Ray Chi
On Wed, Mar 3, 2021 at 6:00 PM Colin King wrote: > > From: Colin Ian King > > Currently the null check logic on dwc->usb_psy is inverted as it allows > calls to power_supply_put with a null dwc->usb_psy causing a null > pointer dereference. Fix this by removing the ! operator. > > Addresses-Cover

[PATCH] usb: dwc3: Fix dereferencing of null dwc->usb_psy

2021-03-03 Thread Colin King
From: Colin Ian King Currently the null check logic on dwc->usb_psy is inverted as it allows calls to power_supply_put with a null dwc->usb_psy causing a null pointer dereference. Fix this by removing the ! operator. Addresses-Coverity: ("Dereference after null check") Fixes: 59fa3def35de ("usb: