Re: [PATCH] usb: dwc2: pci: Fix an error code in probe

2018-10-18 Thread Minas Harutyunyan
On 10/18/2018 11:37 AM, Dan Carpenter wrote:
> We added some error handling to this function but forgot to set the
> error code on this path.
> 
> Fixes: ecd29dabb2ba ("usb: dwc2: pci: Handle error cleanup in probe")
> Signed-off-by: Dan Carpenter 

Acked-by: Minas Harutyunyan 

> ---
>   drivers/usb/dwc2/pci.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c
> index d257c541e51b..7afc10872f1f 100644
> --- a/drivers/usb/dwc2/pci.c
> +++ b/drivers/usb/dwc2/pci.c
> @@ -120,6 +120,7 @@ static int dwc2_pci_probe(struct pci_dev *pci,
>   dwc2 = platform_device_alloc("dwc2", PLATFORM_DEVID_AUTO);
>   if (!dwc2) {
>   dev_err(dev, "couldn't allocate dwc2 device\n");
> + ret = -ENOMEM;
>   goto err;
>   }
>   
> 



[PATCH] usb: dwc2: pci: Fix an error code in probe

2018-10-18 Thread Dan Carpenter
We added some error handling to this function but forgot to set the
error code on this path.

Fixes: ecd29dabb2ba ("usb: dwc2: pci: Handle error cleanup in probe")
Signed-off-by: Dan Carpenter 
---
 drivers/usb/dwc2/pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c
index d257c541e51b..7afc10872f1f 100644
--- a/drivers/usb/dwc2/pci.c
+++ b/drivers/usb/dwc2/pci.c
@@ -120,6 +120,7 @@ static int dwc2_pci_probe(struct pci_dev *pci,
dwc2 = platform_device_alloc("dwc2", PLATFORM_DEVID_AUTO);
if (!dwc2) {
dev_err(dev, "couldn't allocate dwc2 device\n");
+   ret = -ENOMEM;
goto err;
}
 
-- 
2.11.0