* [PATCH -next v3] thermal: armada: fix copy-paste error in armada_thermal_probe()
@ 2018-07-30 6:59 Wei Yongjun
2018-07-30 7:29 ` Daniel Lezcano
2018-07-30 7:35 ` Miquel Raynal
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2018-07-30 6:59 UTC (permalink / raw)
To: kernel-janitors
The return value from devm_kzalloc() is not checked correctly. The
test is done against a wrong variable. Fix it.
Fixes: e72f03ef2543 ("thermal: armada: use the resource managed registration helper alternative")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v2 - > v3: fix the description
---
drivers/thermal/armada_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 8de4ba5..a269482 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -610,7 +610,7 @@ static int armada_thermal_probe(struct platform_device *pdev)
return -ENOMEM;
drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
- if (!priv)
+ if (!drvdata)
return -ENOMEM;
priv->dev = &pdev->dev;
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH -next v3] thermal: armada: fix copy-paste error in armada_thermal_probe() 2018-07-30 6:59 [PATCH -next v3] thermal: armada: fix copy-paste error in armada_thermal_probe() Wei Yongjun @ 2018-07-30 7:29 ` Daniel Lezcano 2018-07-30 7:35 ` Miquel Raynal 1 sibling, 0 replies; 3+ messages in thread From: Daniel Lezcano @ 2018-07-30 7:29 UTC (permalink / raw) To: kernel-janitors On 30/07/2018 09:07, Wei Yongjun wrote: > The return value from devm_kzalloc() is not checked correctly. The > test is done against a wrong variable. Fix it. > > Fixes: e72f03ef2543 ("thermal: armada: use the resource managed registration helper alternative") > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > --- > v2 - > v3: fix the description > --- Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next v3] thermal: armada: fix copy-paste error in armada_thermal_probe() 2018-07-30 6:59 [PATCH -next v3] thermal: armada: fix copy-paste error in armada_thermal_probe() Wei Yongjun 2018-07-30 7:29 ` Daniel Lezcano @ 2018-07-30 7:35 ` Miquel Raynal 1 sibling, 0 replies; 3+ messages in thread From: Miquel Raynal @ 2018-07-30 7:35 UTC (permalink / raw) To: kernel-janitors Hi Wei, Daniel Lezcano <daniel.lezcano@linaro.org> wrote on Mon, 30 Jul 2018 09:29:32 +0200: > On 30/07/2018 09:07, Wei Yongjun wrote: > > The return value from devm_kzalloc() is not checked correctly. The > > test is done against a wrong variable. Fix it. > > > > Fixes: e72f03ef2543 ("thermal: armada: use the resource managed registration helper alternative") > > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > > --- > > v2 - > v3: fix the description > > --- > > > Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> > > Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Thanks, Miquèl -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-30 7:35 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-07-30 6:59 [PATCH -next v3] thermal: armada: fix copy-paste error in armada_thermal_probe() Wei Yongjun 2018-07-30 7:29 ` Daniel Lezcano 2018-07-30 7:35 ` Miquel Raynal
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox