From: Wei Yongjun <yongjun_...@trendmicro.com.cn>

Fix to release all resources when fusbh200_setup() fail instead of only
return error.

Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn>
---
 drivers/usb/host/fusbh200-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200-hcd.c
index 79ce799..7f3293b 100644
--- a/drivers/usb/host/fusbh200-hcd.c
+++ b/drivers/usb/host/fusbh200-hcd.c
@@ -5864,7 +5864,7 @@ static int fusbh200_hcd_fusbh200_probe(struct 
platform_device *pdev)
 
        retval = fusbh200_setup(hcd);
        if (retval)
-               return retval;
+               goto fail_add_hcd;
 
        fusbh200_init(fusbh200);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to