From patchwork Wed Aug 16 20:04:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 13355631 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 352CFC25B7D for ; Wed, 16 Aug 2023 20:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x6O+dZQfurUtOueNye+VU9HoPq/Tx3yu1osF+E9PoRU=; b=nfX2s62uQkfKsD ulvgXp+8SXodlzh2XqjvDmtPyYdWwQRviXhIkEA8jp9gbj89YM2/63kU6NrQRGwWcFx6ZEjUm56VU dhekJEPF2uPEn0Lb/takWlLOkZYrvBSlU0thwZZc4NiXDfPQil89LnBUFtFg2tFNo3jbjr9Rhd2EE TFGv7Bzyr5WG6xbtj5Jw9KvVpVAPDPgfiVr5LdcRBycIx3LMmdkBwoe2mBmDw94W2P+RxsHxF5KkW 5OdhROiCqYM+6jA1tgI+z6teIhrk5u6cf2HWrZg+ZQ+UxOFMtPZUflqVZNexq52fzeIEVV0Qaa1Je CudhmX3Vr1hWurKrmhYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWMrY-004vyG-37; Wed, 16 Aug 2023 20:11:28 +0000 Received: from mx4.sionneau.net ([51.15.250.1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWMrH-004vqn-1t for linux-arm-kernel@lists.infradead.org; Wed, 16 Aug 2023 20:11:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sionneau.net; s=selectormx4; t=1692216270; 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=26DUZLe4PV/0nEWQNlxeRLfNg1jDJUvrXE6RFg1ThPg=; b=SRo7JCOYfnLKt/roeC4G6zaXhgZ8gfwdQ52MwzmbFJUQLcW4J7OpqrjU7aa6OSvPCxk8H2 XlUK5hS6P81rJOdSZ9sQJu72UpGRB0zBphTcHmBmBRnxV7onSSw/WnwHfyNwJk4zi5QlIb tdsuR+X8pdGTCMaihQaiPRSlS6XlkB0= Received: from fallen-ThinkPad-X260.hotspot.hub-one.net ( [37.169.176.143]) by mx4.sionneau.net (OpenSMTPD) with ESMTPSA id dbbb5935 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 16 Aug 2023 20:04:30 +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 4/4] i2c: imx: devm_pinctrl_get() cannot return NULL Date: Wed, 16 Aug 2023 22:04:10 +0200 Message-Id: <20230816200410.62131-5-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230816_131111_900059_9A5DEF1E X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove unnecessary check against NULL for devm_pinctrl_get() return value. Signed-off-by: Yann Sionneau Acked-by: Oleksij Rempel --- drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 65128a73e8a3..502276e8ded5 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1389,7 +1389,7 @@ static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx, struct i2c_bus_recovery_info *rinfo = &i2c_imx->rinfo; i2c_imx->pinctrl = devm_pinctrl_get(&pdev->dev); - if (!i2c_imx->pinctrl || IS_ERR(i2c_imx->pinctrl)) { + if (IS_ERR(i2c_imx->pinctrl)) { dev_info(&pdev->dev, "can't get pinctrl, bus recovery not supported\n"); return PTR_ERR(i2c_imx->pinctrl); }