On 3/30/2018 11:35 AM, Grigor Tovmasyan wrote:
> On 3/28/2018 5:36 PM, Wei Yongjun wrote:
>> Fix to return error code -ENOMEM from the alloc fail error handling
>> case instead of 0, as done elsewhere in this function.
>>
>> Fixes: ecd29dabb2ba ("usb: dwc2: pci: Handle error cleanup in probe")
>> Signed-off-by: Wei Yongjun <weiyongj...@huawei.com>
> 
> Reviewed-by: Grigor Tovmasyan <tovma...@synopsys.com>

Acked-by: Minas Harutyunyan <hmi...@synopsys.com>
> 
>> ---
>>    drivers/usb/dwc2/pci.c | 4 +++-
>>    1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c
>> index 7f21747..bea2e8e 100644
>> --- a/drivers/usb/dwc2/pci.c
>> +++ b/drivers/usb/dwc2/pci.c
>> @@ -141,8 +141,10 @@ static int dwc2_pci_probe(struct pci_dev *pci,
>>              goto err;
>>    
>>      glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);
>> -    if (!glue)
>> +    if (!glue) {
>> +            ret = -ENOMEM;
>>              goto err;
>> +    }
>>    
>>      ret = platform_device_add(dwc2);
>>      if (ret) {
>>
>> --
>> 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  
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwICAw&c=DPL6_X_6JkXFx7AXWqB0tg&r=K1ULVL1slpLXpMJJlAXSOxws4tRq0IkTBqxDkyW2hUQ&m=6vLEHiNG2gKkx9F-l1Yy77Kde75g7qA8Aw3fKXaQgCI&s=rFkdkzcIhy-tbIL8_skjqNXbFvj1Iolbh9CZ4-LNt4U&e=
>>
> 
> 

--
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