diff mbox series

pinctrl: mlxbf3: Fix return value check for devm_platform_ioremap_resource

Message ID 20240621091637.2299310-1-nichen@iscas.ac.cn
State New
Headers show
Series pinctrl: mlxbf3: Fix return value check for devm_platform_ioremap_resource | expand

Commit Message

Chen Ni June 21, 2024, 9:16 a.m. UTC
Fix return value check for devm_platform_ioremap_resource() in
mlxbf3_pinctrl_probe().

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/pinctrl/pinctrl-mlxbf3.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Linus Walleij June 26, 2024, 10:14 a.m. UTC | #1
Hi Chen,

On Fri, Jun 21, 2024 at 11:16 AM Chen Ni <nichen@iscas.ac.cn> wrote:

> Fix return value check for devm_platform_ioremap_resource() in
> mlxbf3_pinctrl_probe().
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Well spotted! Patch applied.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-mlxbf3.c b/drivers/pinctrl/pinctrl-mlxbf3.c
index 7d1713824a89..ffb5dda364dc 100644
--- a/drivers/pinctrl/pinctrl-mlxbf3.c
+++ b/drivers/pinctrl/pinctrl-mlxbf3.c
@@ -259,16 +259,16 @@  static int mlxbf3_pinctrl_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->fw_ctrl_set0);
 
 	priv->fw_ctrl_clr0 = devm_platform_ioremap_resource(pdev, 1);
-	if (IS_ERR(priv->fw_ctrl_set0))
-		return PTR_ERR(priv->fw_ctrl_set0);
+	if (IS_ERR(priv->fw_ctrl_clr0))
+		return PTR_ERR(priv->fw_ctrl_clr0);
 
 	priv->fw_ctrl_set1 = devm_platform_ioremap_resource(pdev, 2);
-	if (IS_ERR(priv->fw_ctrl_set0))
-		return PTR_ERR(priv->fw_ctrl_set0);
+	if (IS_ERR(priv->fw_ctrl_set1))
+		return PTR_ERR(priv->fw_ctrl_set1);
 
 	priv->fw_ctrl_clr1 = devm_platform_ioremap_resource(pdev, 3);
-	if (IS_ERR(priv->fw_ctrl_set0))
-		return PTR_ERR(priv->fw_ctrl_set0);
+	if (IS_ERR(priv->fw_ctrl_clr1))
+		return PTR_ERR(priv->fw_ctrl_clr1);
 
 	ret = devm_pinctrl_register_and_init(dev,
 					     &mlxbf3_pin_desc,