public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: OHCI: Only use ohci_driver_overrides if they are defined
@ 2013-10-15 12:21 Charles Keepax
  2013-10-15 17:09 ` Charles Keepax
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Keepax @ 2013-10-15 12:21 UTC (permalink / raw)
  To: stern
  Cc: manjunath.goudar, gregkh, linux-usb, linux-kernel, patches,
	Charles Keepax

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 <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/usb/host/ohci-hcd.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 21d937a..e26abd5 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -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)
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] USB: OHCI: Only use ohci_driver_overrides if they are defined
  2013-10-15 12:21 [PATCH] USB: OHCI: Only use ohci_driver_overrides if they are defined Charles Keepax
@ 2013-10-15 17:09 ` Charles Keepax
  2013-10-15 20:13   ` Alan Stern
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Keepax @ 2013-10-15 17:09 UTC (permalink / raw)
  To: stern; +Cc: manjunath.goudar, gregkh, linux-usb, linux-kernel, patches

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] USB: OHCI: Only use ohci_driver_overrides if they are defined
  2013-10-15 17:09 ` Charles Keepax
@ 2013-10-15 20:13   ` Alan Stern
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Stern @ 2013-10-15 20:13 UTC (permalink / raw)
  To: Charles Keepax; +Cc: gregkh, USB list, Kernel development list, patches

On Tue, 15 Oct 2013, Charles Keepax wrote:

> 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:

https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/drivers/usb/host/ohci-hcd.c?h=usb-next&id=c80ad6d1cd6c6662d0cff752d94a1a9fde6de4ac

Alan Stern


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-15 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 12:21 [PATCH] USB: OHCI: Only use ohci_driver_overrides if they are defined Charles Keepax
2013-10-15 17:09 ` Charles Keepax
2013-10-15 20:13   ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox