diff mbox series

[2/3] watchdog: s3c2410_wdt: Unify error logging format in probe function

Message ID 20230306090919.2206871-3-u.kleine-koenig@pengutronix.de (mailing list archive)
State New
Headers show
Series [1/3] watchdog: s3c2410_wdt: Fold s3c2410_get_wdt_drv_data() into only caller | expand

Commit Message

Uwe Kleine-König March 6, 2023, 9:09 a.m. UTC
In the probe function a mixture of dev_err() and dev_err_probe() is used.
Align the format of the error messages when dev_err() is used to that of
dev_err_probe() for consistency. Apart from consistency this also
mentions the human readable error code.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/watchdog/s3c2410_wdt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 7382bf038161..93df6ee331a0 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -617,7 +617,7 @@  static int s3c2410wdt_probe(struct platform_device *pdev)
 		ret = of_property_read_u32(dev->of_node,
 					   "samsung,cluster-index", &index);
 		if (ret) {
-			dev_err(dev, "failed to get cluster index\n");
+			dev_err(dev, "error %pe: failed to get cluster index\n", ERR_PTR(-EINVAL));
 			return -EINVAL;
 		}
 
@@ -631,7 +631,7 @@  static int s3c2410wdt_probe(struct platform_device *pdev)
 				variant = &drv_data_exynosautov9_cl1;
 			break;
 		default:
-			dev_err(dev, "wrong cluster index: %u\n", index);
+			dev_err(dev, "error %pe: wrong cluster index: %u\n", ERR_PTR(-EINVAL), index);
 			return -EINVAL;
 		}
 	}
@@ -642,7 +642,7 @@  static int s3c2410wdt_probe(struct platform_device *pdev)
 		wdt->pmureg = syscon_regmap_lookup_by_phandle(dev->of_node,
 						"samsung,syscon-phandle");
 		if (IS_ERR(wdt->pmureg)) {
-			dev_err(dev, "syscon regmap lookup failed.\n");
+			dev_err(dev, "error %pe: syscon regmap lookup failed.\n", wdt->pmureg);
 			return PTR_ERR(wdt->pmureg);
 		}
 	}
@@ -686,7 +686,7 @@  static int s3c2410wdt_probe(struct platform_device *pdev)
 			dev_warn(dev, "tmr_margin value out of range, default %d used\n",
 				 S3C2410_WATCHDOG_DEFAULT_TIME);
 		} else {
-			dev_err(dev, "failed to use default timeout\n");
+			dev_err(dev, "error: %pe: failed to use default timeout\n", ERR_PTR(ret));
 			return ret;
 		}
 	}
@@ -694,7 +694,7 @@  static int s3c2410wdt_probe(struct platform_device *pdev)
 	ret = devm_request_irq(dev, wdt_irq, s3c2410wdt_irq, 0,
 			       pdev->name, pdev);
 	if (ret != 0) {
-		dev_err(dev, "failed to install irq (%d)\n", ret);
+		dev_err(dev, "error: %pe: failed to install irq\n", ERR_PTR(ret));
 		return ret;
 	}