lkml.org 
[lkml]   [2020]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] usb: bdc: Remove duplicate error message in bdc_probe()
From
Date

在 2020/9/28 14:49, Chunfeng Yun 写道:
> On Sun, 2020-09-27 at 21:42 +0800, Tang Bin wrote:
>> In this function, we don't need dev_err() message because
>> when something goes wrong, devm_platform_ioremap_resource()
>> can print an error message itself, so remove the redundant
>> one.
>>
>> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
>> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
>> ---
>> drivers/usb/gadget/udc/bdc/bdc_core.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c
>> index 02a3a7746..9454f179e 100644
>> --- a/drivers/usb/gadget/udc/bdc/bdc_core.c
>> +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
>> @@ -508,10 +508,8 @@ static int bdc_probe(struct platform_device *pdev)
>> bdc->clk = clk;
>>
>> bdc->regs = devm_platform_ioremap_resource(pdev, 0);
>> - if (IS_ERR(bdc->regs)) {
>> - dev_err(dev, "ioremap error\n");
>> + if (IS_ERR(bdc->regs))
>> return -ENOMEM;
>> - }
>> irq = platform_get_irq(pdev, 0);
>> if (irq < 0)
>> return irq;
> Cc bdc's maintainer: Florian Fainelli <f.fainelli@gmail.com>

Got it, thanks.

Tang Bin

>
>


\
 
 \ /
  Last update: 2020-09-28 10:40    [W:0.055 / U:3.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site