Skip to content
Commit 037e966f authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron
Browse files

iio:light:stk3310: move device register to end of probe



iio_device_register should be the last operation during probe. Therefor
move up interrupt setup code and while at it, change the check for invalid
values of client->irq to be smaller than zero.
Fixes: 3dd477ac ("iio: light: Add threshold interrupt support for STK3310")

As the device_register makes the userspace interfaces of the device available
it is possible for requests to come in before the probe sequence has finished.
This can lead to unhandled interrupts and similar.

Signed-off-by: default avatarHartmut Knaack <knaack.h@gmx.de>
Reviewed-by: default avatarTiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent c5d0db06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment