lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191018131338.11713-1-hslester96@gmail.com>
Date:   Fri, 18 Oct 2019 21:13:38 +0800
From:   Chuhong Yuan <hslester96@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Chuhong Yuan <hslester96@...il.com>
Subject: [PATCH] mmc: renesas_sdhi: add checks for pinctrl_lookup_state

renesas_sdhi_probe misses checks for pinctrl_lookup_state and may miss
failures.
Add checks for them to fix the problem.

Signed-off-by: Chuhong Yuan <hslester96@...il.com>
---
 drivers/mmc/host/renesas_sdhi_core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index d4ada5cca2d1..dc5ad6632df3 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -694,8 +694,13 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 	if (!IS_ERR(priv->pinctrl)) {
 		priv->pins_default = pinctrl_lookup_state(priv->pinctrl,
 						PINCTRL_STATE_DEFAULT);
+		if (IS_ERR(priv->pins_default))
+			return PTR_ERR(priv->pins_default);
+
 		priv->pins_uhs = pinctrl_lookup_state(priv->pinctrl,
 						"state_uhs");
+		if (IS_ERR(priv->pins_uhs))
+			return PTR_ERR(priv->pins_uhs);
 	}
 
 	host = tmio_mmc_host_alloc(pdev, mmc_data);
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ