Commit 9b6d368b authored by Wan Jiabing's avatar Wan Jiabing Committed by Shawn Guo
Browse files

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: default avatarWan Jiabing <wanjiabing@vivo.com>
Acked-by: default avatarIvan Bornyakov <i.bornyakov@metrotek.ru>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 31231092
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);