* [PATCH] PM / devfreq: imx: Fix inconsistent IS_ERR and PTR_ERR @ 2020-05-07 13:12 ` Gustavo A. R. Silva 2020-05-07 13:27 ` Aisheng Dong 2020-05-08 3:55 ` Chanwoo Choi 0 siblings, 2 replies; 4+ messages in thread From: Gustavo A. R. Silva @ 2020-05-07 13:12 UTC (permalink / raw) To: MyungJoo Ham, Kyungmin Park, Chanwoo Choi, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Leonard Crestez Cc: linux-pm, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva Fix inconsistent IS_ERR and PTR_ERR in imx_bus_init_icc(). The proper pointer to be passed as argument to PTR_ERR() is priv->icc_pdev. This bug was detected with the help of Coccinelle. Fixes: 16c1d2f1b0bd ("PM / devfreq: imx: Register interconnect device") Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> --- drivers/devfreq/imx-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c index 532e7954032f..4f38455ad742 100644 --- a/drivers/devfreq/imx-bus.c +++ b/drivers/devfreq/imx-bus.c @@ -88,8 +88,8 @@ static int imx_bus_init_icc(struct device *dev) dev, icc_driver_name, -1, NULL, 0); if (IS_ERR(priv->icc_pdev)) { dev_err(dev, "failed to register icc provider %s: %ld\n", - icc_driver_name, PTR_ERR(priv->devfreq)); - return PTR_ERR(priv->devfreq); + icc_driver_name, PTR_ERR(priv->icc_pdev)); + return PTR_ERR(priv->icc_pdev); } return 0; -- 2.26.2 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] PM / devfreq: imx: Fix inconsistent IS_ERR and PTR_ERR 2020-05-07 13:12 ` [PATCH] PM / devfreq: imx: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva @ 2020-05-07 13:27 ` Aisheng Dong 2020-05-08 3:55 ` Chanwoo Choi 1 sibling, 0 replies; 4+ messages in thread From: Aisheng Dong @ 2020-05-07 13:27 UTC (permalink / raw) To: Gustavo A. R. Silva, MyungJoo Ham, Kyungmin Park, Chanwoo Choi, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx, Leonard Crestez Cc: linux-pm, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva > From: Gustavo A. R. Silva <gustavoars@kernel.org> > Sent: Thursday, May 7, 2020 9:13 PM > > Fix inconsistent IS_ERR and PTR_ERR in imx_bus_init_icc(). > > The proper pointer to be passed as argument to PTR_ERR() is > priv->icc_pdev. > > This bug was detected with the help of Coccinelle. > > Fixes: 16c1d2f1b0bd ("PM / devfreq: imx: Register interconnect device") > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Thanks for the fix. Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Regards Aisheng > --- > drivers/devfreq/imx-bus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c index > 532e7954032f..4f38455ad742 100644 > --- a/drivers/devfreq/imx-bus.c > +++ b/drivers/devfreq/imx-bus.c > @@ -88,8 +88,8 @@ static int imx_bus_init_icc(struct device *dev) > dev, icc_driver_name, -1, NULL, 0); > if (IS_ERR(priv->icc_pdev)) { > dev_err(dev, "failed to register icc provider %s: %ld\n", > - icc_driver_name, PTR_ERR(priv->devfreq)); > - return PTR_ERR(priv->devfreq); > + icc_driver_name, PTR_ERR(priv->icc_pdev)); > + return PTR_ERR(priv->icc_pdev); > } > > return 0; > -- > 2.26.2 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PM / devfreq: imx: Fix inconsistent IS_ERR and PTR_ERR 2020-05-07 13:12 ` [PATCH] PM / devfreq: imx: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva 2020-05-07 13:27 ` Aisheng Dong @ 2020-05-08 3:55 ` Chanwoo Choi 2020-05-08 3:57 ` Chanwoo Choi 1 sibling, 1 reply; 4+ messages in thread From: Chanwoo Choi @ 2020-05-08 3:55 UTC (permalink / raw) To: Gustavo A. R. Silva, MyungJoo Ham, Kyungmin Park, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Leonard Crestez Cc: linux-pm, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva On 5/7/20 10:12 PM, Gustavo A. R. Silva wrote: > Fix inconsistent IS_ERR and PTR_ERR in imx_bus_init_icc(). > > The proper pointer to be passed as argument to PTR_ERR() is > priv->icc_pdev. > > This bug was detected with the help of Coccinelle. > > Fixes: 16c1d2f1b0bd ("PM / devfreq: imx: Register interconnect device") > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> > --- > drivers/devfreq/imx-bus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c > index 532e7954032f..4f38455ad742 100644 > --- a/drivers/devfreq/imx-bus.c > +++ b/drivers/devfreq/imx-bus.c > @@ -88,8 +88,8 @@ static int imx_bus_init_icc(struct device *dev) > dev, icc_driver_name, -1, NULL, 0); > if (IS_ERR(priv->icc_pdev)) { > dev_err(dev, "failed to register icc provider %s: %ld\n", > - icc_driver_name, PTR_ERR(priv->devfreq)); > - return PTR_ERR(priv->devfreq); > + icc_driver_name, PTR_ERR(priv->icc_pdev)); > + return PTR_ERR(priv->icc_pdev); > } > > return 0; > Applied it. Thanks. -- Best Regards, Chanwoo Choi Samsung Electronics ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PM / devfreq: imx: Fix inconsistent IS_ERR and PTR_ERR 2020-05-08 3:55 ` Chanwoo Choi @ 2020-05-08 3:57 ` Chanwoo Choi 0 siblings, 0 replies; 4+ messages in thread From: Chanwoo Choi @ 2020-05-08 3:57 UTC (permalink / raw) To: Gustavo A. R. Silva, MyungJoo Ham, Kyungmin Park, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Leonard Crestez Cc: linux-pm, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva On 5/8/20 12:55 PM, Chanwoo Choi wrote: > On 5/7/20 10:12 PM, Gustavo A. R. Silva wrote: >> Fix inconsistent IS_ERR and PTR_ERR in imx_bus_init_icc(). >> >> The proper pointer to be passed as argument to PTR_ERR() is >> priv->icc_pdev. >> >> This bug was detected with the help of Coccinelle. >> >> Fixes: 16c1d2f1b0bd ("PM / devfreq: imx: Register interconnect device") >> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> >> --- >> drivers/devfreq/imx-bus.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c >> index 532e7954032f..4f38455ad742 100644 >> --- a/drivers/devfreq/imx-bus.c >> +++ b/drivers/devfreq/imx-bus.c >> @@ -88,8 +88,8 @@ static int imx_bus_init_icc(struct device *dev) >> dev, icc_driver_name, -1, NULL, 0); >> if (IS_ERR(priv->icc_pdev)) { >> dev_err(dev, "failed to register icc provider %s: %ld\n", >> - icc_driver_name, PTR_ERR(priv->devfreq)); >> - return PTR_ERR(priv->devfreq); >> + icc_driver_name, PTR_ERR(priv->icc_pdev)); >> + return PTR_ERR(priv->icc_pdev); >> } >> >> return 0; >> > > Applied it. Thanks. > I edit the patch title as following: - before : PM / devfreq: imx: Fix inconsistent IS_ERR and PTR_ERR - after : PM / devfreq: imx-bus: Fix inconsistent IS_ERR and PTR_ERR Thanks. -- Best Regards, Chanwoo Choi Samsung Electronics ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-08 3:48 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20200507130824epcas1p287961e0a2f5019a55ecd1c94772fdfff@epcas1p2.samsung.com> 2020-05-07 13:12 ` [PATCH] PM / devfreq: imx: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva 2020-05-07 13:27 ` Aisheng Dong 2020-05-08 3:55 ` Chanwoo Choi 2020-05-08 3:57 ` Chanwoo Choi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).