All but one error path use dev_err_probe() to emit a message. Use the same incarnation for the remaining exit point for consistency. Signed-off-by: Uwe Kleine-König <ukleinek@xxxxxxxxxx> --- drivers/iio/humidity/dht11.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/iio/humidity/dht11.c b/drivers/iio/humidity/dht11.c index 6182f4d2e9fc..50d2431c938b 100644 --- a/drivers/iio/humidity/dht11.c +++ b/drivers/iio/humidity/dht11.c @@ -306,10 +306,9 @@ static int dht11_probe(struct platform_device *pdev) "Failed to aquire GPIO\n"); dht11->irq = gpiod_to_irq(dht11->gpiod); - if (dht11->irq < 0) { - dev_err(dev, "GPIO %d has no interrupt\n", desc_to_gpio(dht11->gpiod)); - return -EINVAL; - } + if (dht11->irq < 0) + return dev_err_probe(dev, -EINVAL, "GPIO %d has no interrupt\n", + desc_to_gpio(dht11->gpiod)); dht11->timestamp = ktime_get_boottime_ns() - DHT11_DATA_VALID_TIME - 1; dht11->num_edges = -1; -- 2.36.1