[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1365499312-14232-1-git-send-email-gautam.vivek@samsung.com>
Date: Tue, 09 Apr 2013 14:51:52 +0530
From: Vivek Gautam <gautam.vivek@...sung.com>
To: linux-usb@...r.kernel.org, linux-samsung-soc@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
stern@...land.harvard.edu, kgene.kim@...sung.com,
Manjunath Goudar <manjunath.goudar@...aro.org>,
Arnd Bergmann <arnd@...db.de>, Jingoo Han <jg1.han@...sung.com>
Subject: [PATCH] usb: ehci-s5p: fix: Fix null pointer dereferencing
7edb3da makes ehci-s5p as a separate driver. But,
it raised an issue with its driver data.
Now that 's5p_ehci_hcd' doesn't maintain pointer to 'usb_hcd'
and s5p_ehci is nothing but a pointer to hcd->priv;
add hcd to the driver data rather than s5p_ehci.
This fixes issues with null pointer dereferencing in
s5p_ehci_shutdown(), s5p_ehci_suspend(), s5p_ehci_resume().
Signed-off-by: Vivek Gautam <gautam.vivek@...sung.com>
CC: Manjunath Goudar <manjunath.goudar@...aro.org>
CC: Arnd Bergmann <arnd@...db.de>
CC: Jingoo Han <jg1.han@...sung.com>
---
drivers/usb/host/ehci-s5p.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index d8cb0ca..580548a 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -173,7 +173,7 @@ static int s5p_ehci_probe(struct platform_device *pdev)
goto fail_add_hcd;
}
- platform_set_drvdata(pdev, s5p_ehci);
+ platform_set_drvdata(pdev, hcd);
return 0;
--
1.7.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists