patch "usb: chipidea: ci_hdrc_imx: add missing put_device() call in" added to usb-linus
Subsystems (4)
This is a note to let you know that I've just added the patch titled
usb: chipidea: ci_hdrc_imx: add missing put_device() call in
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 83a43ff80a566de8718dfc6565545a0080ec1fb5 Mon Sep 17 00:00:00 2001
From: Yu Kuai <[email protected]>
Date: Tue, 17 Nov 2020 09:14:30 +0800
Subject: usb: chipidea: ci_hdrc_imx: add missing put_device() call in
usbmisc_get_init_data()
if of_find_device_by_node() succeed, usbmisc_get_init_data() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation.
--- drivers/usb/chipidea/ci_hdrc_imx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/usb/chipidea/ci_hdrc_imx.c +5 -1
@@ -139,9 +139,13 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev) misc_pdev =of_find_device_by_node (args.np);of_node_put (args.np); -if (!misc_pdev || !platform_get_drvdata (misc_pdev)) +if (!misc_pdev)return ERR_PTR (-EPROBE_DEFER ); +if (!platform_get_drvdata (misc_pdev)) { +put_device (&misc_pdev->dev); +return ERR_PTR (-EPROBE_DEFER ); + } data->dev = &misc_pdev->dev;/*
Signature · 1 line
2.29.2