From patchwork Tue May 11 09:54:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 434189 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3663039jao; Tue, 11 May 2021 02:54:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvDTtOCCzGYR4DKo3Hdau30ekwAgIx/8yXcRCV9CB4I9w1gtzLn0PsxyZ99roxnPAZJKdJ X-Received: by 2002:a5d:9546:: with SMTP id a6mr20961148ios.102.1620726879104; Tue, 11 May 2021 02:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620726879; cv=none; d=google.com; s=arc-20160816; b=Ed/c4fM029INxAicObVZjGl7TcdrrwfWea5zXJvmcmnKsetIFcjySknY551aCAQh/H hGk2BBBHaC+zz3b0C2a7mUftxPgMSH+nTRcfn8Q7ykrRXF6Lwc2meDQiH6t4KDObldkk upaJzaAMDQYk4q+fVSiIy4GSnYmzIvXAGv4216wUUHVXfGNNKP2l9qlPhCvGTIB+Rvc8 2/34hoyrO67UV+xutNpWF3qbt3N6Wp3tUYMCWE2OLwBfJzlF2xqzkKYIKVa2MIT5SaLD PPnwPigpkJhDVsv4mFyXUgNMNsJgW/h7GLsQWMSgOT5CgACMWtB3idpydzoUv5XTNSq1 K5uw== 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=erDyX4HnDvjMAnWBG7IBBBwj6WTSr+gjG7lQ3PElC7k=; b=CVR6JLwb+InpPtYVWZC/VszZaw7zbPoThRIszglGizmOY9ugnctl+HBIVPmy0U7BGi cj+CcEhCDW2x0WOoIghd3GZIQgmrkKi46zeLy4/n3hnSs3VD/AJxWRlu9oH+i5qdFu3e 0FnS/kUAsAUh8/f2mbOkJxItIvXPX1Vmrj5d7G4+R43pFBMNCa5cB0KnvExyJHsrG46B uynUrEOrFa7bBR5uGGOxms5ZlD/JPx2Di9UW1adt0R4oo4LotIzZZBZIoDAqSt0tnQSM /fJxgu1v1mcxDse4RZGrabw/mIlNDa7ANEdDndHXK6sDOqNcfE1oK/+QOw+bORXnhxNQ EKcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 j23si19504807ioo.31.2021.05.11.02.54.38; Tue, 11 May 2021 02:54:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-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-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 S231319AbhEKJzn (ORCPT + 8 others); Tue, 11 May 2021 05:55:43 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:2627 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbhEKJzm (ORCPT ); Tue, 11 May 2021 05:55:42 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FfYB05mV4zlc7f; Tue, 11 May 2021 17:52:24 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 17:54:24 +0800 From: Zhen Lei To: Claudiu Beznea , Sebastian Reichel , Nicolas Ferre , "Alexandre Belloni" , Ludovic Desroches , linux-pm , linux-arm-kernel CC: Zhen Lei Subject: [PATCH 1/1] tty: serial: sifive: Remove redundant error printing in sifive_serial_probe() Date: Tue, 11 May 2021 17:54:13 +0800 Message-ID: <20210511095413.4938-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-pm@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/tty/serial/sifive.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c index 0ac0371f943b688..4b28b5ae72899cf 100644 --- a/drivers/tty/serial/sifive.c +++ b/drivers/tty/serial/sifive.c @@ -947,10 +947,8 @@ static int sifive_serial_probe(struct platform_device *pdev) mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_ioremap_resource(&pdev->dev, mem); - if (IS_ERR(base)) { - dev_err(&pdev->dev, "could not acquire device memory\n"); + if (IS_ERR(base)) return PTR_ERR(base); - } clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) {