From patchwork Sun Sep 27 13:42:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tang Bin X-Patchwork-Id: 297481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F6BEC4346E for ; Sun, 27 Sep 2020 13:51:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CCB92389F for ; Sun, 27 Sep 2020 13:51:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726267AbgI0Nvr (ORCPT ); Sun, 27 Sep 2020 09:51:47 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:24100 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbgI0Nvr (ORCPT ); Sun, 27 Sep 2020 09:51:47 -0400 X-Greylist: delayed 545 seconds by postgrey-1.27 at vger.kernel.org; Sun, 27 Sep 2020 09:51:45 EDT Received: from spf.mail.chinamobile.com (unknown[172.16.121.7]) by rmmx-syy-dmz-app07-12007 (RichMail) with SMTP id 2ee75f7096be93d-df9df; Sun, 27 Sep 2020 21:42:23 +0800 (CST) X-RM-TRANSID: 2ee75f7096be93d-df9df X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.0.144.153]) by rmsmtp-syy-appsvr04-12004 (RichMail) with SMTP id 2ee45f7096bbeea-169d4; Sun, 27 Sep 2020 21:42:23 +0800 (CST) X-RM-TRANSID: 2ee45f7096bbeea-169d4 From: Tang Bin To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Tang Bin , Zhang Shengju Subject: [PATCH] usb: bdc: Remove duplicate error message in bdc_probe() Date: Sun, 27 Sep 2020 21:42:18 +0800 Message-Id: <20200927134218.20028-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 Signed-off-by: Tang Bin --- 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;