[PATCH v3 3/3] Staging: iio: adt7316: Add a dev_err() message
From: Shreeya Patel
Date: Sat Dec 08 2018 - 10:17:00 EST
Add a dev_err() message "failed to request irq" for describing
what went wrong when an error contition is statisfied.
Signed-off-by: Shreeya Patel <shreeya.patel23498@xxxxxxxxx>
---
drivers/staging/iio/addac/adt7316.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 97dd48153293..e3eb8ad06403 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -1832,8 +1832,11 @@ static int adt7316_setup_irq(struct iio_dev *indio_dev)
NULL, adt7316_event_handler,
irq_type | IRQF_ONESHOT,
indio_dev->name, indio_dev);
- if (ret)
+ if (ret) {
+ dev_err(&indio_dev->dev, "failed to request irq %d\n",
+ chip->bus.irq);
return ret;
+ }
if (irq_type & IRQF_TRIGGER_HIGH)
chip->config1 |= ADT7316_INT_POLARITY;
--
2.17.1