iio: Fixed device id check bug
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
7ea11f0dd3
commit
11211936b6
@@ -41,7 +41,7 @@
|
||||
mraa_iio_context
|
||||
mraa_iio_init(int device)
|
||||
{
|
||||
if (plat_iio->iio_device_count == 0 || device > plat_iio->iio_device_count) {
|
||||
if (plat_iio->iio_device_count == 0 || device >= plat_iio->iio_device_count) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user