From patchwork Thu Aug 25 07:04:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 600187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92714C28D13 for ; Thu, 25 Aug 2022 07:09:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236566AbiHYHJy (ORCPT ); Thu, 25 Aug 2022 03:09:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235442AbiHYHJx (ORCPT ); Thu, 25 Aug 2022 03:09:53 -0400 X-Greylist: delayed 304 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 25 Aug 2022 00:09:50 PDT Received: from out30-42.freemail.mail.aliyun.com (unknown [115.124.30.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 689FA11455; Thu, 25 Aug 2022 00:09:50 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R381e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046050; MF=yang.lee@linux.alibaba.com; NM=1; PH=DS; RN=7; SR=0; TI=SMTPD_---0VNCEMA-_1661411080; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VNCEMA-_1661411080) by smtp.aliyun-inc.com; Thu, 25 Aug 2022 15:04:40 +0800 From: Yang Li To: tony@atomide.com Cc: lgirdwood@gmail.com, broonie@kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] regulator: drivers: Remove unnecessary print function dev_err() Date: Thu, 25 Aug 2022 15:04:38 +0800 Message-Id: <20220825070438.128093-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The print function dev_err() is redundant because platform_get_irq_byname() already prints an error. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1986 Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/regulator/tps65219-regulator.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c index 7ba2594e437c..ab16e6665625 100644 --- a/drivers/regulator/tps65219-regulator.c +++ b/drivers/regulator/tps65219-regulator.c @@ -363,11 +363,9 @@ static int tps65219_regulator_probe(struct platform_device *pdev) irq_type = &tps65219_regulator_irq_types[i]; irq = platform_get_irq_byname(pdev, irq_type->irq_name); - if (irq < 0) { - dev_err(tps->dev, "Failed to get IRQ %s: %d\n", - irq_type->irq_name, irq); + if (irq < 0) return -EINVAL; - } + irq_data[i].dev = tps->dev; irq_data[i].type = irq_type;