Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbcd85a0 authored by Vivek Gautam's avatar Vivek Gautam Committed by Greg Kroah-Hartman
Browse files

usb: ehci-s5p: fix: Fix null pointer dereferencing



7edb3daf: (USB: EHCI: make ehci-s5p a separate driver)
raised an issue with ehci-s5p's 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: default avatarVivek Gautam <gautam.vivek@samsung.com>
CC: Manjunath Goudar <manjunath.goudar@linaro.org>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Jingoo Han <jg1.han@samsung.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e5ab9f18
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;