From patchwork Tue May 11 09:09:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 434182 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3634768jao; Tue, 11 May 2021 02:09:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk7RLZ/XkbTxQOE2mQcSzRneThMRj3ejq33Be1RD5RV09IkUFB0x48KNyhZYJ0a8c8nA/5 X-Received: by 2002:a17:907:399:: with SMTP id ss25mr30845350ejb.134.1620724193555; Tue, 11 May 2021 02:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620724193; cv=none; d=google.com; s=arc-20160816; b=LPs6HhfSjiQCqTPu/dGx21A0yE7z+whkfbN6anr7TFizhKc24hfox+rEk2YJxRfBz5 nNTJzN8UcGuDL/16aalJwZGSSiKvYGe5sQPkCJgwD93vWhU95ILmM9GjyhNXjFGkOo0m 9YRESOX0+r/Bk6MUH486v2BqW/p9dvqf5cW1pymc4Ds1m+g7uTC88qgtBRHocUt2JaBc Wmj6j1uTHLuBbAWqchni0MKTiEcyHRsokf6aUpKjYuAytkSBCRmWsLt4u013kGNA5v5r RQDnneR//+2igXCEkSnECSDCyTRiY+HjsZ1Xg8JSiLXM9RP37sOXCz6X1Shdi5ROPQuh HSnA== 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=mVTJjPNkN0jV9rWPvVUR4bGCiZipBo8+m14kq6puWBU=; b=VPGU7DpkONXyIP6aF/9FhT7FA3Z8UDvuobZ8SZBZ0/7gv2EqG4Glb03fgF9xIJCpfa zdJJxl6LPnfRcnD5jblVfoQ6oMnOR5ebNBV0b+lUOwU049XSj4N+9hx+7M5DV0YaiOLu eJHzNvyMla4g+uKqZm2Yc+GGrG0Bh0Ldl5vXxcysxFvxWbdkcV7ZRc+T8Ki2GY55yGGC nUt4g9Tp0IsBmCzctJ1/tHdjdrZND4Wo+Kmjn8tvy3p0eVG7la7gLRHFITYELYtTttPK QnRLSIQ5Qrb286feK2v7z+zelEKUmAYajWCSXgrpdWdYuvm3ij0Vqle6k0MBpyFAloM/ 4hKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q25si2655585edw.105.2021.05.11.02.09.53; Tue, 11 May 2021 02:09:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-gpio-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-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231199AbhEKJK6 (ORCPT + 3 others); Tue, 11 May 2021 05:10:58 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2559 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbhEKJK6 (ORCPT ); Tue, 11 May 2021 05:10:58 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FfX9q4dg0zkWMH; Tue, 11 May 2021 17:07:11 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 17:09:40 +0800 From: Zhen Lei To: Linus Walleij , linux-gpio CC: Zhen Lei Subject: [PATCH 1/1] pinctrl: ocelot: Remove redundant error printing in ocelot_pinctrl_probe() Date: Tue, 11 May 2021 17:09:36 +0800 Message-ID: <20210511090936.4452-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/pinctrl/pinctrl-ocelot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 2fd18e356d0c6f2..e470c16718dea20 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1362,10 +1362,8 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) base = devm_ioremap_resource(dev, platform_get_resource(pdev, IORESOURCE_MEM, 0)); - if (IS_ERR(base)) { - dev_err(dev, "Failed to ioremap registers\n"); + if (IS_ERR(base)) return PTR_ERR(base); - } info->stride = 1 + (info->desc->npins - 1) / 32;