]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adc: mediatek: fix unset field
authorFabien Parent <fparent@baylibre.com>
Sun, 18 Oct 2020 19:46:44 +0000 (21:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:29:21 +0000 (13:29 +0100)
commit760d4e3ee879f7a9bf0421ce2ffa6f7484ed18e2
tree3f356d99efe34eeec354b4bc49e4ef97d1fc2c90
parentd3e27c62334ebce9d9efa6aea6252d6c432c9af0
iio: adc: mediatek: fix unset field

commit 15207a92e019803d62687455d8aa2ff9eb3dc82c upstream.

dev_comp field is used in a couple of places but it is never set. This
results in kernel oops when dereferencing a NULL pointer. Set the
`dev_comp` field correctly in the probe function.

Fixes: 6d97024dce23 ("iio: adc: mediatek: mt6577-auxadc, add mt6765 support")
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201018194644.3366846-1-fparent@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/mt6577_auxadc.c