Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp68448lqk; Wed, 13 Mar 2024 16:56:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGExwhNfShLawkeVopDa1uuIVA4PA7FHk+xVhAJ6S4PDAewNNsluraIdqOuGfyNqCZuBlK2aFUYuS81db18YghZgRm1/fgQlgMZ1vThg== X-Google-Smtp-Source: AGHT+IHCTr2QU84v1cgI+0lf5B176OLf+FPaImL2FAkl0w5oUvVQQ4OCUOibYlWJfN0YLxZqqV3q X-Received: by 2002:a17:90a:ead3:b0:29c:7537:afbc with SMTP id ev19-20020a17090aead300b0029c7537afbcmr181782pjb.31.1710374183765; Wed, 13 Mar 2024 16:56:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710374183; cv=pass; d=google.com; s=arc-20160816; b=ujMCaXvVpIUUa4QNf+cu/S1T4I9r4xt3HnXar++VsmGwsVcjPM6qfYTdMvHMkXBlxR mQgmTrzhf4jweNe46HYYCbJOWhjupK8fRm1KvlNHRTUs+EQZacy8o+9ROx9CAFfFuGKR CQjbRhSbLYjn74+ou+crEpaRjdxKm6nty26GU/6wjdL1n4EqlgB6ASPSboeAGH2/UW7g t+2imsnJ+S0l783yKEOiABRf4sXceK6soCHb+Ey1CUEp+HBz56k2QanK9abme7YH3RFt 7zVKqbY+BeGrOswq+oPMKKgt/iZotsXCZrq20IOm8rFTlbr0f6AGOp/rZG9WEQdMyLyF Xsww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=/8Y/E4ULISY5s3a3gti7oqjlfehfCSD5vvSj2w8wTKY=; fh=gZClyzT/eJjApr5eNXSCZCyUGDwc0nMn1hVkLcyIyUY=; b=X2uZF8LVs1Y3sg/meV/WnFeS9v+VI9lvw+5q/74FptsbSUHD2QX7NdABK1Ap9Jva3k G+aUmBIjP/48ZfSDzLZ5fAfSSaMkoIY0+1QMP4OcIJOndNmnbeP8fXKJiyP4xvoL4YTj 9Xngpk/G0HGvYNJ77eE+eKXgvxUK0TTcQpI7q76x+RHA2Q689y3UWagcCqH+hHKcneRl UOgRaHr+VcpFKZeKccYkzV+mQ1nvfp/i1k/X87NwX0fkP0mPdlon/pojU7lei91Cz6OL tEyAgb21KzYPiXPGoC7m27gi/QDgvjKF2zg5LXzTCA1Cmgk9aClsiSJAw1ftGOhDb5Su DS5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-102658-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102658-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x4-20020a17090a388400b0029c35274823si2327735pjb.113.2024.03.13.16.56.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 16:56:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102658-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-102658-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102658-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 30E01B20FAA for ; Wed, 13 Mar 2024 23:55:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C54B35F845; Wed, 13 Mar 2024 23:54:38 +0000 (UTC) Received: from fgw22-7.mail.saunalahti.fi (fgw22-7.mail.saunalahti.fi [62.142.5.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D2865D907 for ; Wed, 13 Mar 2024 23:54:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.83 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710374078; cv=none; b=jRnzdEX/hc9A2NBgeAsruV2Kn5p9rC37EHdxFGrv09eqA1iDAfg5WAjRC2I4MrfWmrUv9zIfWCD/7j3EOQXq+XA9XA/nciJknRFEptaUpJ0HGzmBFXypIRJExqFqXF2wh8UDWJNv5IzLUqyJacwcmZrfFNqISkExvS9TXeutQqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710374078; c=relaxed/simple; bh=GLJSgRLelWjt7dIinJmYtT1PfasRJUH2zmyz15NzJ20=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YlVozuSBFH/DpzsZp0YazWRbqBHJCxLGynURKzHp3+h27bYP/AxvjeC0xo1u4FY8Cj9stupEU2fuDlRXGbjFsiPJc0ZYGM89jGwUbG+Xi4C+57vT0ZcjmsTWrdpQ1n8cDsi5RfMIp1dRbypmz4o4bXytnV7vzynD/szt6GYEOfg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-217.elisa-laajakaista.fi [88.113.26.217]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id 096ee361-e195-11ee-a9de-005056bdf889; Thu, 14 Mar 2024 01:54:32 +0200 (EET) From: Andy Shevchenko To: Linus Walleij , Andy Shevchenko , AngeloGioacchino Del Regno , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 08/11] pinctrl: aw9523: Make use of dev_err_probe() Date: Thu, 14 Mar 2024 01:52:11 +0200 Message-ID: <20240313235422.180075-9-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240313235422.180075-1-andy.shevchenko@gmail.com> References: <20240313235422.180075-1-andy.shevchenko@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Andy Shevchenko Simplify the error handling in probe function by switching from dev_err() to dev_err_probe(). Signed-off-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-aw9523.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl-aw9523.c b/drivers/pinctrl/pinctrl-aw9523.c index 44b798c39e26b..17c359f9c45c0 100644 --- a/drivers/pinctrl/pinctrl-aw9523.c +++ b/drivers/pinctrl/pinctrl-aw9523.c @@ -816,10 +816,8 @@ static int aw9523_init_irq(struct aw9523 *awi, int irq) ret = devm_request_threaded_irq(dev, irq, NULL, aw9523_irq_thread_func, IRQF_ONESHOT, dev_name(dev), awi); - if (ret) { - dev_err(dev, "Failed to request irq %d\n", irq); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "Failed to request irq %d\n", irq); girq = &awi->gpio.irq; gpio_irq_chip_set_chip(girq, &aw9523_irq_chip); @@ -1016,8 +1014,7 @@ static int aw9523_probe(struct i2c_client *client) awi->pctl = devm_pinctrl_register(dev, pdesc, awi); if (IS_ERR(awi->pctl)) { - ret = PTR_ERR(awi->pctl); - dev_err(dev, "Cannot register pinctrl: %d", ret); + ret = dev_err_probe(dev, PTR_ERR(awi->pctl), "Cannot register pinctrl"); goto err_disable_vregs; } -- 2.44.0