Skip to content

Commit

Permalink
iio: st_sensors: print error when failing to get IRQ
Browse files Browse the repository at this point in the history
Print a proper error message if we're missing the trigger
IRQ.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Linus Walleij authored and Jonathan Cameron committed May 7, 2015
1 parent e693e15 commit 3337c9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/iio/common/st_sensors/st_sensors_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
IRQF_TRIGGER_RISING,
sdata->trig->name,
sdata->trig);
if (err)
if (err) {
dev_err(&indio_dev->dev, "failed to request trigger IRQ.\n");
goto request_irq_error;
}

iio_trigger_set_drvdata(sdata->trig, indio_dev);
sdata->trig->ops = trigger_ops;
Expand Down

0 comments on commit 3337c9f

Please sign in to comment.