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: <1648635500-12631-1-git-send-email-baihaowen@meizu.com>
Date:   Wed, 30 Mar 2022 18:18:20 +0800
From:   Haowen Bai <baihaowen@...zu.com>
To:     Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Ivan Bornyakov <i.bornyakov@...rotek.ru>
CC:     Haowen Bai <baihaowen@...zu.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH] bus: imx-weim: fix pdev is NULL but dereferenced

pdev is NULL,so we can't dereference it dev_err(&pdev->dev

Fixes: e6cb540 ("bus: imx-weim: add DT overlay support for WEIM bus")

Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
 drivers/bus/imx-weim.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 60fbd42..31a2213 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -352,9 +352,8 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action,
 
 		pdev = of_find_device_by_node(rd->dn);
 		if (!pdev) {
-			dev_err(&pdev->dev,
-				"Could not find platform device for '%pOF'\n",
-				rd->dn);
+			pr_err("%s: Could not find platform device for '%pOF'\n",
+				__func__, rd->dn);
 
 			ret = notifier_from_errno(-EINVAL);
 		} else {
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ