Commit 8cb775bb authored by Markus Elfring's avatar Markus Elfring Committed by Daniel Lezcano

thermal: Delete an error message in four functions

The function “platform_get_irq” can log an error already.
Thus omit redundant messages for the exception handling in the
calling functions.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: default avatarKeerthy <j-keerthy@ti.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/05f49ae7-5cc7-d6a0-fc3d-abaf2a0b373c@web.de
parent 0145f678
...@@ -1241,10 +1241,8 @@ static int rockchip_thermal_probe(struct platform_device *pdev) ...@@ -1241,10 +1241,8 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
return -ENXIO; return -ENXIO;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "no irq resource?\n");
return -EINVAL; return -EINVAL;
}
thermal = devm_kzalloc(&pdev->dev, sizeof(struct rockchip_thermal_data), thermal = devm_kzalloc(&pdev->dev, sizeof(struct rockchip_thermal_data),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -94,10 +94,8 @@ static int st_mmap_register_enable_irq(struct st_thermal_sensor *sensor) ...@@ -94,10 +94,8 @@ static int st_mmap_register_enable_irq(struct st_thermal_sensor *sensor)
int ret; int ret;
sensor->irq = platform_get_irq(pdev, 0); sensor->irq = platform_get_irq(pdev, 0);
if (sensor->irq < 0) { if (sensor->irq < 0)
dev_err(dev, "failed to register IRQ\n");
return sensor->irq; return sensor->irq;
}
ret = devm_request_threaded_irq(dev, sensor->irq, ret = devm_request_threaded_irq(dev, sensor->irq,
NULL, st_mmap_thermal_trip_handler, NULL, st_mmap_thermal_trip_handler,
......
...@@ -385,10 +385,8 @@ static int stm_register_irq(struct stm_thermal_sensor *sensor) ...@@ -385,10 +385,8 @@ static int stm_register_irq(struct stm_thermal_sensor *sensor)
int ret; int ret;
sensor->irq = platform_get_irq(pdev, 0); sensor->irq = platform_get_irq(pdev, 0);
if (sensor->irq < 0) { if (sensor->irq < 0)
dev_err(dev, "%s: Unable to find IRQ\n", __func__);
return sensor->irq; return sensor->irq;
}
ret = devm_request_threaded_irq(dev, sensor->irq, ret = devm_request_threaded_irq(dev, sensor->irq,
NULL, NULL,
......
...@@ -772,10 +772,9 @@ static int ti_bandgap_talert_init(struct ti_bandgap *bgp, ...@@ -772,10 +772,9 @@ static int ti_bandgap_talert_init(struct ti_bandgap *bgp,
int ret; int ret;
bgp->irq = platform_get_irq(pdev, 0); bgp->irq = platform_get_irq(pdev, 0);
if (bgp->irq < 0) { if (bgp->irq < 0)
dev_err(&pdev->dev, "get_irq failed\n");
return bgp->irq; return bgp->irq;
}
ret = request_threaded_irq(bgp->irq, NULL, ret = request_threaded_irq(bgp->irq, NULL,
ti_bandgap_talert_irq_handler, ti_bandgap_talert_irq_handler,
IRQF_TRIGGER_HIGH | IRQF_ONESHOT, IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment