From patchwork Thu Mar 1 13:37:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10251435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB06960211 for ; Thu, 1 Mar 2018 13:37:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D933620182 for ; Thu, 1 Mar 2018 13:37:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE0D4201B1; Thu, 1 Mar 2018 13:37:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B055420182 for ; Thu, 1 Mar 2018 13:37:45 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 33F9F2678FE; Thu, 1 Mar 2018 14:37:39 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B48172678FF; Thu, 1 Mar 2018 14:37:36 +0100 (CET) Received: from cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by alsa0.perex.cz (Postfix) with ESMTP id 6BC222678EC for ; Thu, 1 Mar 2018 14:37:32 +0100 (CET) Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23992828AbeCANhcYyqRy (ORCPT ); Thu, 1 Mar 2018 14:37:32 +0100 Date: Thu, 1 Mar 2018 14:37:31 +0100 From: Ladislav Michl To: alsa-devel@alsa-project.org Message-ID: <20180301133731.GA30722@lenoch> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) Cc: Mark Brown , Alexandre Belloni , Nicolas Ferre Subject: [alsa-devel] [PATCH v2] ASoC: atmel: Remove redundant dev_err() call in probe function X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP There is an error message within devm_ioremap_resource already, so remove the redundant dev_err() call. Signed-off-by: Ladislav Michl Acked-by: Nicolas Ferre Acked-by: Alexandre Belloni --- Changes: - v2: None, just added Ack. sound/soc/atmel/atmel-classd.c | 7 ++----- sound/soc/atmel/atmel-pdmic.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index 9baaf6bc5fbd..3d70061901a0 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -583,11 +583,8 @@ static int atmel_classd_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); io_base = devm_ioremap_resource(dev, res); - if (IS_ERR(io_base)) { - ret = PTR_ERR(io_base); - dev_err(dev, "failed to remap register memory: %d\n", ret); - return ret; - } + if (IS_ERR(io_base)) + return PTR_ERR(io_base); dd->phy_base = res->start; dd->dev = dev; diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c index 94f852574a44..915c2b064de1 100644 --- a/sound/soc/atmel/atmel-pdmic.c +++ b/sound/soc/atmel/atmel-pdmic.c @@ -633,11 +633,8 @@ static int atmel_pdmic_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); io_base = devm_ioremap_resource(dev, res); - if (IS_ERR(io_base)) { - ret = PTR_ERR(io_base); - dev_err(dev, "failed to remap register memory: %d\n", ret); - return ret; - } + if (IS_ERR(io_base)) + return PTR_ERR(io_base); dd->phy_base = res->start;