Message ID | 20230802094527.988842-1-chenjiahao16@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [-next] thermal: Clean up redundant dev_err_probe() | expand |
Il 02/08/23 11:45, Chen Jiahao ha scritto: > Referring to platform_get_irq()'s definition, the return value has > already been checked if ret < 0, and printed via dev_err_probe(). > Calling dev_err_probe() one more time outside platform_get_irq() > is obviously redundant. > > Removing dev_err_probe() outside platform_get_irq() to clean up > above problem. > > Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On 02/08/2023 11:45, Chen Jiahao wrote: > Referring to platform_get_irq()'s definition, the return value has > already been checked if ret < 0, and printed via dev_err_probe(). > Calling dev_err_probe() one more time outside platform_get_irq() > is obviously redundant. > > Removing dev_err_probe() outside platform_get_irq() to clean up > above problem. > > Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> > --- Applied, thanks
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 054c965ae5e1..371f66e899bd 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -1138,7 +1138,7 @@ static int lvts_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) - return dev_err_probe(dev, irq, "No irq resource\n"); + return irq; ret = lvts_domain_init(dev, lvts_td, lvts_data); if (ret)
Referring to platform_get_irq()'s definition, the return value has already been checked if ret < 0, and printed via dev_err_probe(). Calling dev_err_probe() one more time outside platform_get_irq() is obviously redundant. Removing dev_err_probe() outside platform_get_irq() to clean up above problem. Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> --- drivers/thermal/mediatek/lvts_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)