]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: fix error return code in omap2430_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 30 Dec 2022 08:17:30 +0000 (16:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:38 +0000 (07:24 +0100)
commit7cd881051c7a5ae046852b966a086cd8bead48d1
tree508db87751b6bf6504383c420298a05b63882168
parentddb0cc7fe5d7f0f437aac531628f4739bd0c2f92
usb: musb: fix error return code in omap2430_probe()

commit 847fd56f3a73bae2d86e2acd13e93be216a00a7d upstream.

Before calling platform_get_resource() in omap2430_probe(), the 'ret' is
re-assgined to 0, it can't return an error code, if platform_get_resource
fails. Set the error code to -EINVAL to fix this.

Fixes: d1d9c9010e59 ("usb: musb: omap2430: Fix probe regression for missing resources")
Cc: stable <stable@kernel.org>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221230081730.1655616-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/omap2430.c