Re: [PATCH] USB: serial: drop bogus to_usb_serial_port() checks

2021-02-09 Thread Johan Hovold
On Mon, Feb 08, 2021 at 06:06:38PM +0100, Uwe Kleine-König wrote: > On 2/8/21 4:48 PM, Johan Hovold wrote: > > The to_usb_serial_port() macro is implemented using container_of() so > > there's no need to check for NULL. > > > > Note that neither bus match() or probe() is ever called with a NULL >

Re: [PATCH] USB: serial: drop bogus to_usb_serial_port() checks

2021-02-08 Thread Uwe Kleine-König
On 2/8/21 4:48 PM, Johan Hovold wrote: The to_usb_serial_port() macro is implemented using container_of() so there's no need to check for NULL. Note that neither bus match() or probe() is ever called with a NULL struct device pointer so the checks weren't just misplaced. Signed-off-by: Johan Ho

Re: [PATCH] USB: serial: drop bogus to_usb_serial_port() checks

2021-02-08 Thread Greg Kroah-Hartman
On Mon, Feb 08, 2021 at 04:48:06PM +0100, Johan Hovold wrote: > The to_usb_serial_port() macro is implemented using container_of() so > there's no need to check for NULL. > > Note that neither bus match() or probe() is ever called with a NULL > struct device pointer so the checks weren't just misp