summaryrefslogtreecommitdiffstats
path: root/drivers/bus
diff options
context:
space:
mode:
authorWan Jiabing <wanjiabing@vivo.com>2022-02-23 04:51:45 +0100
committerShawn Guo <shawnguo@kernel.org>2022-04-06 14:44:20 +0200
commit9b6d368b082e1922ae55a669769bc98fba9e4833 (patch)
tree249f021f4e3d9870dd1aaf0bdbe4edf34c9169fa /drivers/bus
parentLinux 5.18-rc1 (diff)
downloadlinux-9b6d368b082e1922ae55a669769bc98fba9e4833.tar.xz
linux-9b6d368b082e1922ae55a669769bc98fba9e4833.zip
bus: imx-weim: fix NULL but dereferenced coccicheck error
Fix following coccicheck warning: ./drivers/bus/imx-weim.c:355:18-21: ERROR: pdev is NULL but dereferenced. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Acked-by: Ivan Bornyakov <i.bornyakov@metrotek.ru> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/imx-weim.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 60fbd42041dd..2ea0a51f79f6 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -352,8 +352,7 @@ 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",
+ pr_err("Could not find platform device for '%pOF'\n",
rd->dn);
ret = notifier_from_errno(-EINVAL);