From patchwork Wed Aug 16 20:04:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 714489 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 06BE4C19F4F for ; Wed, 16 Aug 2023 20:05:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345895AbjHPUE6 (ORCPT ); Wed, 16 Aug 2023 16:04:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345874AbjHPUE1 (ORCPT ); Wed, 16 Aug 2023 16:04:27 -0400 Received: from mx4.sionneau.net (mx4.sionneau.net [51.15.250.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2D861BE8; Wed, 16 Aug 2023 13:04:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sionneau.net; s=selectormx4; t=1692216265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TR5waAKqgJDCuh+rCJahhuidB0eME1Oapggx75cClbQ=; b=bmf5vcGVXogUm50nsSTAHcIBD2I5AmKXA/kHZTFQJuyCiNvaiqrwt3o7cPD78DrqxN1NkR Gh6buxGqfMDtuyP0h/tT5166PzLHRd1Dnw7OYAd0Bs1I5bBMopB1FOA6ivRAO6vo/lO4KG n/tTHz+mtjj1MDoJ9ii7i9koJG2eYP4= Received: from fallen-ThinkPad-X260.hotspot.hub-one.net ( [37.169.176.143]) by mx4.sionneau.net (OpenSMTPD) with ESMTPSA id b10c9cd5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 16 Aug 2023 20:04:24 +0000 (UTC) From: Yann Sionneau To: Andi Shyti , Codrin Ciubotariu , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Michal Simek , Oleksij Rempel , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Yann Sionneau Subject: [PATCH 2/4] i2c: at91-master: devm_pinctrl_get() cannot return NULL Date: Wed, 16 Aug 2023 22:04:08 +0200 Message-Id: <20230816200410.62131-3-yann@sionneau.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230816200410.62131-1-yann@sionneau.net> References: <20230816200410.62131-1-yann@sionneau.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Remove unnecessary check against NULL for devm_pinctrl_get() return value. Signed-off-by: Yann Sionneau --- drivers/i2c/busses/i2c-at91-master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-at91-master.c b/drivers/i2c/busses/i2c-at91-master.c index c0c35785a0dc..b598d2439eb1 100644 --- a/drivers/i2c/busses/i2c-at91-master.c +++ b/drivers/i2c/busses/i2c-at91-master.c @@ -832,7 +832,7 @@ static int at91_init_twi_recovery_gpio(struct platform_device *pdev, struct i2c_bus_recovery_info *rinfo = &dev->rinfo; rinfo->pinctrl = devm_pinctrl_get(&pdev->dev); - if (!rinfo->pinctrl || IS_ERR(rinfo->pinctrl)) { + if (IS_ERR(rinfo->pinctrl)) { dev_info(dev->dev, "can't get pinctrl, bus recovery not supported\n"); return PTR_ERR(rinfo->pinctrl); }