* [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos()
@ 2020-05-09 3:02 ` Wei Yongjun
0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2020-05-09 2:58 UTC (permalink / raw)
To: Georgi Djakov, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Alexandre Bailon, Leonard Crestez
Cc: kernel-janitors, Wei Yongjun, Hulk Robot, linux-arm-kernel, linux-pm
In case of error, the function of_parse_phandle() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/interconnect/imx/imx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
index 6884212511f0..ac420f86008e 100644
--- a/drivers/interconnect/imx/imx.c
+++ b/drivers/interconnect/imx/imx.c
@@ -90,10 +90,10 @@ static int imx_icc_node_init_qos(struct icc_provider *provider,
node->name, node->id);
} else {
dn = of_parse_phandle(dev->of_node, adj->phandle_name, 0);
- if (IS_ERR(dn)) {
- dev_warn(dev, "Failed to parse %s: %ld\n",
- adj->phandle_name, PTR_ERR(dn));
- return PTR_ERR(dn);
+ if (!dn) {
+ dev_warn(dev, "Failed to parse %s\n",
+ adj->phandle_name);
+ return -ENODEV;
}
/* Allow scaling to be disabled on a per-node basis */
if (!dn || !of_device_is_available(dn)) {
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos()
@ 2020-05-09 3:02 ` Wei Yongjun
0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2020-05-09 3:02 UTC (permalink / raw)
To: Georgi Djakov, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Alexandre Bailon, Leonard Crestez
Cc: Wei Yongjun, linux-pm, linux-arm-kernel, kernel-janitors, Hulk Robot
In case of error, the function of_parse_phandle() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/interconnect/imx/imx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
index 6884212511f0..ac420f86008e 100644
--- a/drivers/interconnect/imx/imx.c
+++ b/drivers/interconnect/imx/imx.c
@@ -90,10 +90,10 @@ static int imx_icc_node_init_qos(struct icc_provider *provider,
node->name, node->id);
} else {
dn = of_parse_phandle(dev->of_node, adj->phandle_name, 0);
- if (IS_ERR(dn)) {
- dev_warn(dev, "Failed to parse %s: %ld\n",
- adj->phandle_name, PTR_ERR(dn));
- return PTR_ERR(dn);
+ if (!dn) {
+ dev_warn(dev, "Failed to parse %s\n",
+ adj->phandle_name);
+ return -ENODEV;
}
/* Allow scaling to be disabled on a per-node basis */
if (!dn || !of_device_is_available(dn)) {
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos()
@ 2020-05-09 3:02 ` Wei Yongjun
0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2020-05-09 3:02 UTC (permalink / raw)
To: Georgi Djakov, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Alexandre Bailon, Leonard Crestez
Cc: kernel-janitors, Wei Yongjun, Hulk Robot, linux-arm-kernel, linux-pm
In case of error, the function of_parse_phandle() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/interconnect/imx/imx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
index 6884212511f0..ac420f86008e 100644
--- a/drivers/interconnect/imx/imx.c
+++ b/drivers/interconnect/imx/imx.c
@@ -90,10 +90,10 @@ static int imx_icc_node_init_qos(struct icc_provider *provider,
node->name, node->id);
} else {
dn = of_parse_phandle(dev->of_node, adj->phandle_name, 0);
- if (IS_ERR(dn)) {
- dev_warn(dev, "Failed to parse %s: %ld\n",
- adj->phandle_name, PTR_ERR(dn));
- return PTR_ERR(dn);
+ if (!dn) {
+ dev_warn(dev, "Failed to parse %s\n",
+ adj->phandle_name);
+ return -ENODEV;
}
/* Allow scaling to be disabled on a per-node basis */
if (!dn || !of_device_is_available(dn)) {
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos()
2020-05-09 3:02 ` Wei Yongjun
(?)
@ 2020-05-09 3:51 ` Aisheng Dong
-1 siblings, 0 replies; 9+ messages in thread
From: Aisheng Dong @ 2020-05-09 3:51 UTC (permalink / raw)
To: Wei Yongjun, Georgi Djakov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
Alexandre Bailon, Leonard Crestez
Cc: Hulk Robot, kernel-janitors, linux-arm-kernel, linux-pm
PiBGcm9tOiBXZWkgWW9uZ2p1biA8d2VpeW9uZ2p1bjFAaHVhd2VpLmNvbT4NCj4gU2VudDogU2F0
dXJkYXksIE1heSA5LCAyMDIwIDExOjAyIEFNDQo+IA0KPiBJbiBjYXNlIG9mIGVycm9yLCB0aGUg
ZnVuY3Rpb24gb2ZfcGFyc2VfcGhhbmRsZSgpIHJldHVybnMgTlVMTCBwb2ludGVyIG5vdA0KPiBF
UlJfUFRSKCkuIFRoZSBJU19FUlIoKSB0ZXN0IGluIHRoZSByZXR1cm4gdmFsdWUgY2hlY2sgc2hv
dWxkIGJlIHJlcGxhY2VkIHdpdGgNCj4gTlVMTCB0ZXN0Lg0KPiANCj4gRml4ZXM6IGYwZDgwNDg1
MjVkNyAoImludGVyY29ubmVjdDogQWRkIGlteCBjb3JlIGRyaXZlciIpDQo+IFJlcG9ydGVkLWJ5
OiBIdWxrIFJvYm90IDxodWxrY2lAaHVhd2VpLmNvbT4NCj4gU2lnbmVkLW9mZi1ieTogV2VpIFlv
bmdqdW4gPHdlaXlvbmdqdW4xQGh1YXdlaS5jb20+DQoNClJldmlld2VkLWJ5OiBEb25nIEFpc2hl
bmcgPGFpc2hlbmcuZG9uZ0BueHAuY29tPg0KDQpSZWdhcmRzDQpBaXNoZW5nDQo
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos()
@ 2020-05-09 3:51 ` Aisheng Dong
0 siblings, 0 replies; 9+ messages in thread
From: Aisheng Dong @ 2020-05-09 3:51 UTC (permalink / raw)
To: Wei Yongjun, Georgi Djakov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
Alexandre Bailon, Leonard Crestez
Cc: linux-pm, linux-arm-kernel, kernel-janitors, Hulk Robot
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Sent: Saturday, May 9, 2020 11:02 AM
>
> In case of error, the function of_parse_phandle() returns NULL pointer not
> ERR_PTR(). The IS_ERR() test in the return value check should be replaced with
> NULL test.
>
> Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Regards
Aisheng
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos()
@ 2020-05-09 3:51 ` Aisheng Dong
0 siblings, 0 replies; 9+ messages in thread
From: Aisheng Dong @ 2020-05-09 3:51 UTC (permalink / raw)
To: Wei Yongjun, Georgi Djakov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
Alexandre Bailon, Leonard Crestez
Cc: Hulk Robot, kernel-janitors, linux-arm-kernel, linux-pm
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Sent: Saturday, May 9, 2020 11:02 AM
>
> In case of error, the function of_parse_phandle() returns NULL pointer not
> ERR_PTR(). The IS_ERR() test in the return value check should be replaced with
> NULL test.
>
> Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Regards
Aisheng
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos()
2020-05-09 3:02 ` Wei Yongjun
(?)
@ 2020-05-11 13:20 ` Leonard Crestez
-1 siblings, 0 replies; 9+ messages in thread
From: Leonard Crestez @ 2020-05-11 13:20 UTC (permalink / raw)
To: Wei Yongjun, Georgi Djakov
Cc: linux-pm, Shawn Guo, Sascha Hauer, kernel-janitors, Hulk Robot,
dl-linux-imx, Pengutronix Kernel Team, Fabio Estevam,
linux-arm-kernel, Alexandre Bailon
On 2020-05-09 5:58 AM, Wei Yongjun wrote:
> In case of error, the function of_parse_phandle() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check should be
> replaced with NULL test.
>
> Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/interconnect/imx/imx.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
> index 6884212511f0..ac420f86008e 100644
> --- a/drivers/interconnect/imx/imx.c
> +++ b/drivers/interconnect/imx/imx.c
> @@ -90,10 +90,10 @@ static int imx_icc_node_init_qos(struct icc_provider *provider,
> node->name, node->id);
> } else {
> dn = of_parse_phandle(dev->of_node, adj->phandle_name, 0);
> - if (IS_ERR(dn)) {
> - dev_warn(dev, "Failed to parse %s: %ld\n",
> - adj->phandle_name, PTR_ERR(dn));
> - return PTR_ERR(dn);
> + if (!dn) {
> + dev_warn(dev, "Failed to parse %s\n",
> + adj->phandle_name);
> + return -ENODEV;
> }
> /* Allow scaling to be disabled on a per-node basis */
> if (!dn || !of_device_is_available(dn)) {
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos()
@ 2020-05-11 13:20 ` Leonard Crestez
0 siblings, 0 replies; 9+ messages in thread
From: Leonard Crestez @ 2020-05-11 13:20 UTC (permalink / raw)
To: Wei Yongjun, Georgi Djakov
Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
dl-linux-imx, Alexandre Bailon, linux-pm, linux-arm-kernel,
kernel-janitors, Hulk Robot
On 2020-05-09 5:58 AM, Wei Yongjun wrote:
> In case of error, the function of_parse_phandle() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check should be
> replaced with NULL test.
>
> Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/interconnect/imx/imx.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
> index 6884212511f0..ac420f86008e 100644
> --- a/drivers/interconnect/imx/imx.c
> +++ b/drivers/interconnect/imx/imx.c
> @@ -90,10 +90,10 @@ static int imx_icc_node_init_qos(struct icc_provider *provider,
> node->name, node->id);
> } else {
> dn = of_parse_phandle(dev->of_node, adj->phandle_name, 0);
> - if (IS_ERR(dn)) {
> - dev_warn(dev, "Failed to parse %s: %ld\n",
> - adj->phandle_name, PTR_ERR(dn));
> - return PTR_ERR(dn);
> + if (!dn) {
> + dev_warn(dev, "Failed to parse %s\n",
> + adj->phandle_name);
> + return -ENODEV;
> }
> /* Allow scaling to be disabled on a per-node basis */
> if (!dn || !of_device_is_available(dn)) {
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos()
@ 2020-05-11 13:20 ` Leonard Crestez
0 siblings, 0 replies; 9+ messages in thread
From: Leonard Crestez @ 2020-05-11 13:20 UTC (permalink / raw)
To: Wei Yongjun, Georgi Djakov
Cc: linux-pm, Shawn Guo, Sascha Hauer, kernel-janitors, Hulk Robot,
dl-linux-imx, Pengutronix Kernel Team, Fabio Estevam,
linux-arm-kernel, Alexandre Bailon
On 2020-05-09 5:58 AM, Wei Yongjun wrote:
> In case of error, the function of_parse_phandle() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check should be
> replaced with NULL test.
>
> Fixes: f0d8048525d7 ("interconnect: Add imx core driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/interconnect/imx/imx.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
> index 6884212511f0..ac420f86008e 100644
> --- a/drivers/interconnect/imx/imx.c
> +++ b/drivers/interconnect/imx/imx.c
> @@ -90,10 +90,10 @@ static int imx_icc_node_init_qos(struct icc_provider *provider,
> node->name, node->id);
> } else {
> dn = of_parse_phandle(dev->of_node, adj->phandle_name, 0);
> - if (IS_ERR(dn)) {
> - dev_warn(dev, "Failed to parse %s: %ld\n",
> - adj->phandle_name, PTR_ERR(dn));
> - return PTR_ERR(dn);
> + if (!dn) {
> + dev_warn(dev, "Failed to parse %s\n",
> + adj->phandle_name);
> + return -ENODEV;
> }
> /* Allow scaling to be disabled on a per-node basis */
> if (!dn || !of_device_is_available(dn)) {
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-05-11 13:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 2:58 [PATCH -next] interconnect: imx: Fix return value check in imx_icc_node_init_qos() Wei Yongjun
2020-05-09 3:02 ` Wei Yongjun
2020-05-09 3:02 ` Wei Yongjun
2020-05-09 3:51 ` Aisheng Dong
2020-05-09 3:51 ` Aisheng Dong
2020-05-09 3:51 ` Aisheng Dong
2020-05-11 13:20 ` Leonard Crestez
2020-05-11 13:20 ` Leonard Crestez
2020-05-11 13:20 ` Leonard Crestez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.