[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AM0PR04MB4211A1D868406816D7AB570A80AF0@AM0PR04MB4211.eurprd04.prod.outlook.com>
Date: Tue, 4 Dec 2018 12:35:06 +0000
From: Aisheng DONG <aisheng.dong@....com>
To: Wei Yongjun <weiyongjun1@...wei.com>,
Wolfgang Grandegger <wg@...ndegger.com>,
Marc Kleine-Budde <mkl@...gutronix.de>
CC: "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
Joakim Zhang <qiangqing.zhang@....com>,
dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH net-next] can: flexcan: flexcan_chip_start(): fix the
error return code in flexcan_setup_stop_mode()
Copy Joakim.
> > From: Wei Yongjun [mailto:weiyongjun1@...wei.com]
[...]
> > Subject: [PATCH net-next] can: flexcan: flexcan_chip_start(): fix the
> > error return code in flexcan_setup_stop_mode()
> >
> > The error return code PTR_ERR(gpr_np) is always 0 since gpr_np is
> > equal to NULL in this error handling case. Fix it by return -ENOENT.
> >
> > Fixes: de3578c198c6 ("can: flexcan: add self wakeup support")
> > Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> > ---
> > drivers/net/can/flexcan.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> > index
> > 0f36eaf..f412d84 100644
> > --- a/drivers/net/can/flexcan.c
> > +++ b/drivers/net/can/flexcan.c
> > @@ -1432,7 +1432,7 @@ static int flexcan_setup_stop_mode(struct
> > platform_device *pdev)
> > gpr_np = of_find_node_by_phandle(phandle);
> > if (!gpr_np) {
> > dev_dbg(&pdev->dev, "could not find gpr node by phandle\n");
> > - return PTR_ERR(gpr_np);
> > + return -ENOENT;
>
> Good catch.
>
> Reviewed-by: Dong Aisheng <aisheng.dong@....com>
>
> Regards
> Dong Aisheng
>
> > }
> >
> > priv = netdev_priv(dev);
> >
> >
Powered by blists - more mailing lists