From patchwork Tue May 11 11:13:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 434195 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3720339jao; Tue, 11 May 2021 04:14:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUxaXIQqF22rmeiFNmAVJQBjAFeFDhTq0htrxpaUl7fVM4WT1qMXrMeoPwMM+msj36bNWW X-Received: by 2002:a05:6402:1587:: with SMTP id c7mr35050345edv.181.1620731660406; Tue, 11 May 2021 04:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620731660; cv=none; d=google.com; s=arc-20160816; b=hwut2+7slKXVNo94MbDcpqkRj4R+0f0Un9O5QvrqOVWw02Mnwsxlj93xnIHOo+kTrf 7TvepXQqQcG+JMb+vdMkkWpGwjF1vDC3pjdg7gp2U0oAijm5hRNP74oV0GEzB/WQrB0C lOknZUwI1uENrIqCh9X1bx10FDh9qAAboypdFgzg3KOO48JjkNPfNd678QlACiLNGKW0 X+DDPw/0bYGZ85dG/6U6jFYjltXocRpPOkHPbcdYy0xXf4i5jo8aYAAra9qUhWG8+GpG EEB+8UDWB7Bkq/gxSqDFBJRkp0C42dRFx93nfyMdhDyR3AM6ODbVMjy6h3ZyYsg9SIeM FQ7w== 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=6T0JMua6DJS5x6FuKSul/98GHcWurIF4x3aTuPjxIwU=; b=sgS81LbMs1eBSbvLFQfKHSUI/ToeE764Gdy8q7Wmdq+WsFG7qh0jjniaO0FeNrmKbL jswwnTe0t1LKCRxnUIisdNd7G0z0CDBlXNusra0UUgvSd+J0J9mtRn2eIu7JSiujPNAH yTIEnTzG+7DR0IxWa63ddSCUNc4VZWUeuzKsYiq0WtYc7cfCLHSmt7jpTy8ZAHl/2suc Kr412N7+SmuY/R5PvLvR2du2fRXrhPulKsXmr/TqG6yJcnL80qVyws6e4bSS97Nx0aDM xBtiFHJ/gZAIUCsXGk5mVtTkcgXxl+IFAUO+9maUdqW/mGlMXBTL1aNYPezczlcl7wGQ GtrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-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 t19si15831321eje.44.2021.05.11.04.14.20; Tue, 11 May 2021 04:14:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-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-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-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 S231397AbhEKLPZ (ORCPT + 1 other); Tue, 11 May 2021 07:15:25 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2695 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230237AbhEKLPW (ORCPT ); Tue, 11 May 2021 07:15:22 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FfZxK4Z9kz1BJbS for ; Tue, 11 May 2021 19:11:33 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 19:14:07 +0800 From: Zhen Lei To: Dmitry Torokhov , linux-input CC: Zhen Lei Subject: [PATCH 1/1] Input: olpc_apsp - Remove redundant error printing in olpc_apsp_probe() Date: Tue, 11 May 2021 19:13:21 +0800 Message-ID: <20210511111321.5209-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-input@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/input/serio/olpc_apsp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_apsp.c index 59de8d9b6710e34..ef0a16d4c8f46de 100644 --- a/drivers/input/serio/olpc_apsp.c +++ b/drivers/input/serio/olpc_apsp.c @@ -180,10 +180,8 @@ static int olpc_apsp_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); priv->base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(priv->base)) { - dev_err(&pdev->dev, "Failed to map WTM registers\n"); + if (IS_ERR(priv->base)) return PTR_ERR(priv->base); - } priv->irq = platform_get_irq(pdev, 0); if (priv->irq < 0)