Commit b919e077 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

USB: ohci-sm501: fix error return code in ohci_hcd_sm501_drv_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 7d9e6f5a ("usb: host: ohci-sm501: init genalloc for local memory")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20200506135625.106910-1-weiyongjun1@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c856b4b0
......@@ -157,9 +157,10 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)
* the call to usb_hcd_setup_local_mem() below does just that.
*/
if (usb_hcd_setup_local_mem(hcd, mem->start,
mem->start - mem->parent->start,
resource_size(mem)) < 0)
retval = usb_hcd_setup_local_mem(hcd, mem->start,
mem->start - mem->parent->start,
resource_size(mem));
if (retval < 0)
goto err5;
retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (retval)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment