In the Linux kernel, the following vulnerability has been resolved: iio: adc: at91: call inputfreedevice() on allocated iiodev Current implementation of at91tsregister() calls inputfreedeivce() on st->tsinput, however, the err label can be reached before the allocated iiodev is stored to st->tsinput. Thus call inputfreedevice() on input instead of st->ts_input.