Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2798817pxk; Sun, 20 Sep 2020 18:17:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybeVR5jDso34RBlL1CACC9vBxzXMFoBC5R+rM/WOZrJiybYOJWXJZ2adDpXMI7Iz3ipqJ9 X-Received: by 2002:a17:906:6d92:: with SMTP id h18mr46392803ejt.405.1600651053473; Sun, 20 Sep 2020 18:17:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600651053; cv=none; d=google.com; s=arc-20160816; b=kUxQ/XTZxY5xQsfjw/tspdpX1XIx1EBnOgU6J1q56iBMDbANxmEmyFfNj53uvfA4+l ju9L7RC3uOgwp3xDISVzw2PA4NmEnRm6gBDASYQiRAgVXDjWVMryr0dQmU3l7aWnfPED rB/RKdHMTLnlV7ZhdGASyvHOzHOlGX0fP9BRD/UJ8neLziIj04uj6+pmQQIBBOvklkSM OYzVzHWFIgje8NN87p3XbF/hveDW5k2+WBQOJfW6oPEplrke7HLiDeTL4L2rf0CG1EBr vE5rXJOlnM6R+2c8Nk2UwAXJRKevT1BYjJd7TQbU1XiMpD6Izxg9bIwFvykDhjVf2ehu F/BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=xnvUba1ExQZ71qJW0cDJFHWx31cxPKwO5uwSviP0s5M=; b=XsisVl3QMNvHyC6jDd1sCW5gKVyAjAiFlP4YjaEmjld9V8v61BftowzdRIKBUwa4aD iK0sSduuai0lccF3mqWf6JCNzB0RT5Mjvw+U9QRLZOZ6rbPu603Q/cIgebaCaTFIL4cM eIYghdzbmV/9lfg4VlcMBaGPStnkESQuGiO6JnoXUvvLe5gQoVLzqEQaujv36z6a+by3 t0ZpuSnvLAbrMRO/RmOLQBNZlwEUfS975PlJDk6KkYltorP8gKktBA0EaoDXhhF7IOOm NcSJZZ8G4ZdmEOAfm3o4jke9yp+0qy5AT2C/yZzQq68KwIbBmFu7RLQK3NQNcuJBixnY UXNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si7694207eds.471.2020.09.20.18.17.09; Sun, 20 Sep 2020 18:17:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726406AbgIUBPy (ORCPT + 99 others); Sun, 20 Sep 2020 21:15:54 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13732 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726126AbgIUBPx (ORCPT ); Sun, 20 Sep 2020 21:15:53 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7E009BE0CB2D04959471; Mon, 21 Sep 2020 09:15:51 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 09:15:40 +0800 From: Liu Shixin To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra CC: , , "Liu Shixin" Subject: [PATCH -next] mtd: rawnand: remove redundant dev_err call in cadence_nand_dt_probe Date: Mon, 21 Sep 2020 09:38:05 +0800 Message-ID: <20200921013805.1724606-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Liu Shixin --- drivers/mtd/nand/raw/cadence-nand-controller.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c index db29e5e512df..b46786cd53e0 100644 --- a/drivers/mtd/nand/raw/cadence-nand-controller.c +++ b/drivers/mtd/nand/raw/cadence-nand-controller.c @@ -2980,18 +2980,14 @@ static int cadence_nand_dt_probe(struct platform_device *ofdev) dev_info(cdns_ctrl->dev, "IRQ: nr %d\n", cdns_ctrl->irq); cdns_ctrl->reg = devm_platform_ioremap_resource(ofdev, 0); - if (IS_ERR(cdns_ctrl->reg)) { - dev_err(&ofdev->dev, "devm_ioremap_resource res 0 failed\n"); + if (IS_ERR(cdns_ctrl->reg)) return PTR_ERR(cdns_ctrl->reg); - } res = platform_get_resource(ofdev, IORESOURCE_MEM, 1); cdns_ctrl->io.dma = res->start; cdns_ctrl->io.virt = devm_ioremap_resource(&ofdev->dev, res); - if (IS_ERR(cdns_ctrl->io.virt)) { - dev_err(cdns_ctrl->dev, "devm_ioremap_resource res 1 failed\n"); + if (IS_ERR(cdns_ctrl->io.virt)) return PTR_ERR(cdns_ctrl->io.virt); - } dt->clk = devm_clk_get(cdns_ctrl->dev, "nf_clk"); if (IS_ERR(dt->clk)) -- 2.25.1