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@xxxxxxxxxxxxxx> --- drivers/watchdog/s3c2410_wdt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; } -- 2.39.1