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

Commit c3661951 authored by Wei Yongjun's avatar Wei Yongjun Committed by Felipe Balbi
Browse files

usb: gadget: fusb300_udc: fix error return code in fusb300_probe()



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

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent ef89a1f3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1461,8 +1461,10 @@ static int __init fusb300_probe(struct platform_device *pdev)

	fusb300->ep0_req = fusb300_alloc_request(&fusb300->ep[0]->ep,
				GFP_KERNEL);
	if (fusb300->ep0_req == NULL)
	if (fusb300->ep0_req == NULL) {
		ret = -ENOMEM;
		goto clean_up3;
	}

	init_controller(fusb300);
	ret = usb_add_gadget_udc(&pdev->dev, &fusb300->gadget);