Skip to content

Commit 9b6d368

Browse files
Wan JiabingShawn Guo
authored andcommitted
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>
1 parent 3123109 commit 9b6d368

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/bus/imx-weim.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,7 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action,
352352

353353
pdev = of_find_device_by_node(rd->dn);
354354
if (!pdev) {
355-
dev_err(&pdev->dev,
356-
"Could not find platform device for '%pOF'\n",
355+
pr_err("Could not find platform device for '%pOF'\n",
357356
rd->dn);
358357

359358
ret = notifier_from_errno(-EINVAL);

0 commit comments

Comments
 (0)