diff options
author | Joe Hattori <[email protected]> | 2024-12-07 13:30:45 +0900 |
---|---|---|
committer | Jonathan Cameron <[email protected]> | 2024-12-07 17:28:39 +0000 |
commit | de6a73bad1743e9e81ea5a24c178c67429ff510b (patch) | |
tree | 9cb81e1a9b2a9d91c24c82e56adc99336894324a | |
parent | 36a44e05cd807a54e5ffad4b96d0d67f68ad8576 (diff) |
iio: adc: at91: call input_free_device() on allocated iio_dev
Current implementation of at91_ts_register() calls input_free_deivce()
on st->ts_input, however, the err label can be reached before the
allocated iio_dev is stored to st->ts_input. Thus call
input_free_device() on input instead of st->ts_input.
Fixes: 84882b060301 ("iio: adc: at91_adc: Add support for touchscreens without TSMR")
Signed-off-by: Joe Hattori <[email protected]>
Link: https://patch.msgid.link/[email protected]
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
-rw-r--r-- | drivers/iio/adc/at91_adc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index a3f0a2321666..5927756b749a 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -979,7 +979,7 @@ static int at91_ts_register(struct iio_dev *idev, return ret; err: - input_free_device(st->ts_input); + input_free_device(input); return ret; } |