[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220223065815.i7qbyz2gtkgjzcwv@x260>
Date: Wed, 23 Feb 2022 09:58:15 +0300
From: Ivan Bornyakov <i.bornyakov@...rotek.ru>
To: Wan Jiabing <wanjiabing@...o.com>
Cc: 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>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
jiabing.wan@...com
Subject: Re: [PATCH] bus: imx-weim: fix NULL but dereferenced coccicheck error
On Wed, Feb 23, 2022 at 11:51:45AM +0800, Wan Jiabing wrote:
> Fix following coccicheck warning:
> ./drivers/bus/imx-weim.c:355:18-21: ERROR: pdev is NULL but dereferenced.
>
> Signed-off-by: Wan Jiabing <wanjiabing@...o.com>
> ---
> drivers/bus/imx-weim.c | 3 +--
> 1 file changed, 1 insertion(+), 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);
> --
> 2.35.1
>
Acked-by: Ivan Bornyakov <i.bornyakov@...rotek.ru>
Powered by blists - more mailing lists