Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884AbeAQLTU (ORCPT + 1 other); Wed, 17 Jan 2018 06:19:20 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:4214 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752625AbeAQLTS (ORCPT ); Wed, 17 Jan 2018 06:19:18 -0500 From: Wei Yongjun To: Kyungmin Park , David Woodhouse , Brian Norris , "Boris Brezillon" , Marek Vasut , Richard Weinberger , Cyrille Pitchen CC: Wei Yongjun , , , Subject: [PATCH -next] mtd: onenand: omap2: Remove redundant dev_err call in omap2_onenand_probe() Date: Wed, 17 Jan 2018 11:25:33 +0000 Message-ID: <1516188333-144550-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun --- drivers/mtd/onenand/omap2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index a4a2159..87c34f6 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -532,10 +532,8 @@ static int omap2_onenand_probe(struct platform_device *pdev) c->phys_base = res->start; c->onenand.base = devm_ioremap_resource(dev, res); - if (IS_ERR(c->onenand.base)) { - dev_err(dev, "Cannot reserve memory region %pR\n", res); + if (IS_ERR(c->onenand.base)) return PTR_ERR(c->onenand.base); - } c->int_gpiod = devm_gpiod_get_optional(dev, "int", GPIOD_IN); if (IS_ERR(c->int_gpiod)) {