Skip to contentSkip to conversation

thermal/drivers/qcom/spmi-adc-tm5: Remove unnecessary print function dev_err()

PATCH Applied Jiapeng Chong 3 participants 3 messages Aug 9, 2022 – Aug 23, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal/drivers/qcom/spmi-adc-tm5: Remove unnecessary print function dev_err()

The print function dev_err() is redundant because platform_get_irq() already prints an error.

./drivers/thermal/qcom/qcom-spmi-adc-tm5.c:1029:2-9: line 1029 is redundant because platform_get_irq() already prints an error.

---
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/thermal/qcom/qcom-spmi-adc-tm5.c +1 -3
index add6f40e5e2a..af68adf720cc 100644
@@ -1025,10 +1025,8 @@ static int adc_tm5_probe(struct platform_device *pdev)
 	adc_tm->base = reg;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "get_irq failed: %d\n", irq);
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = adc_tm5_get_dt_data(adc_tm, node);
 	if (ret) {
Signature · 1 line
2.20.1.7.g153144c
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jiapeng Chong

The print function dev_err() is redundant because platform_get_irq() already prints an error.

./drivers/thermal/qcom/qcom-spmi-adc-tm5.c:1029:2-9: line 1029 is redundant because platform_get_irq() already prints an error.

Quoted 23 lines
---
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/thermal/qcom/qcom-spmi-adc-tm5.c +1 -3
index add6f40e5e2a..af68adf720cc 100644
@@ -1025,10 +1025,8 @@ static int adc_tm5_probe(struct platform_device *pdev)
 	adc_tm->base = reg;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "get_irq failed: %d\n", irq);
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = adc_tm5_get_dt_data(adc_tm, node);
 	if (ret) {
Signature · 1 line
2.20.1.7.g153144c
#2 lore raw
In reply to Jiapeng Chong
The following commit has been merged into the thermal/next branch of thermal:

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     e920209847c396ca243259160b7d10d0dae17b35
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//e920209847c396ca243259160b7d10d0dae17b35
Author:        Jiapeng Chong <[email protected]>
AuthorDate:    Tue, 09 Aug 2022 11:43:46 +08:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Wed, 17 Aug 2022 14:09:39 +02:00

thermal/drivers/qcom/spmi-adc-tm5: Remove unnecessary print function dev_err()

The print function dev_err() is redundant because platform_get_irq() already prints an error.

./drivers/thermal/qcom/qcom-spmi-adc-tm5.c:1029:2-9: line 1029 is redundant because platform_get_irq() already prints an error.

---
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/thermal/qcom/qcom-spmi-adc-tm5.c +1 -3
index add6f40..af68adf 100644
@@ -1025,10 +1025,8 @@ static int adc_tm5_probe(struct platform_device *pdev)
 	adc_tm->base = reg;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "get_irq failed: %d\n", irq);
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = adc_tm5_get_dt_data(adc_tm, node);
 	if (ret) {