USB: OHCI: Only use ohci_driver_overrides if they are defined
Subsystems (2)
PATCH 1/1 USB: OHCI: Only use ohci_driver_overrides if they are defined
Overrides are optional and many drivers pass NULL, in this case don't process the overrides so we don't deference a NULL pointer.
Signed-off-by Charles Keepax <[email protected]>
--- drivers/usb/host/ohci-hcd.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/usb/host/ohci-hcd.c +3 -0
@@ -1161,6 +1161,9 @@ void ohci_init_driver(struct hc_driver *drv,/* Copy the generic table to drv and then apply the overrides */ *drv = ohci_hc_driver; +if (!over) +return ; + drv->product_desc = over->product_desc; drv->hcd_priv_size += over->extra_priv_size;if (over->reset)
Signature · 1 line
1.7.2.5
Apologies looks like I was on an earlier RC there and the users that did this have been removed. I assume this patch can be ignored sorry for the noise.
Thanks,
Charles
Alan Stern
maintainerQuoted 3 lines · Charles Keepax
Apologies looks like I was on an earlier RC there and the users that did this have been removed. I assume this patch can be ignored sorry for the noise.
Actually it's the other way around. The change you submitted has already been merged:
Alan Stern