Skip to content

Commit 09e067e

Browse files
joehattorigregkh
authored andcommitted
iio: adc: at91: call input_free_device() on allocated iio_dev
commit de6a73b upstream. 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: 84882b0 ("iio: adc: at91_adc: Add support for touchscreens without TSMR") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://patch.msgid.link/20241207043045.1255409-1-joe@pf.is.s.u-tokyo.ac.jp Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f110a6d commit 09e067e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/adc/at91_adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ static int at91_ts_register(struct iio_dev *idev,
984984
return ret;
985985

986986
err:
987-
input_free_device(st->ts_input);
987+
input_free_device(input);
988988
return ret;
989989
}
990990

0 commit comments

Comments
 (0)