summaryrefslogtreecommitdiff
path: root/drivers/watchdog/watchdog_pretimeout.h
diff options
context:
space:
mode:
authorMarcelo Schmitt <marcelo.schmitt@analog.com>2023-12-16 20:46:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-26 02:35:48 +0300
commit7faef79764d2de0484fa918ef05982ee831c31f7 (patch)
treed088a97ce53b3300bc2f53da78684533497ecc0d /drivers/watchdog/watchdog_pretimeout.h
parent7c7ddf45868a1cece03eaceb94a8e0ba0d4eaad1 (diff)
downloadlinux-7faef79764d2de0484fa918ef05982ee831c31f7.tar.xz
iio: adc: ad7091r: Pass iio_dev to event handler
commit a25a7df518fc71b1ba981d691e9322e645d2689c upstream. Previous version of ad7091r event handler received the ADC state pointer and retrieved the iio device from driver data field with dev_get_drvdata(). However, no driver data have ever been set, which led to null pointer dereference when running the event handler. Pass the iio device to the event handler and retrieve the ADC state struct from it so we avoid the null pointer dereference and save the driver from filling the driver data field. Fixes: ca69300173b6 ("iio: adc: Add support for AD7091R5 ADC") Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com> Link: https://lore.kernel.org/r/5024b764107463de9578d5b3b0a3d5678e307b1a.1702746240.git.marcelo.schmitt1@gmail.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog/watchdog_pretimeout.h')
0 files changed, 0 insertions, 0 deletions