aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm63.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@free-electrons.com>2017-10-16 14:12:10 +0200
committerGuenter Roeck <linux@roeck-us.net>2017-10-29 18:36:03 -0700
commit534e28d876926669bba0dc31519a0b0026f3dfcb (patch)
tree9af4f9eed950d984347ac578aa0ce359c7f71318 /drivers/hwmon/lm63.c
parenthwmon: (gpio-fan) Convert to use GPIO descriptors (diff)
downloadlinux-dev-534e28d876926669bba0dc31519a0b0026f3dfcb.tar.xz
linux-dev-534e28d876926669bba0dc31519a0b0026f3dfcb.zip
hwmon: (gpio-fan) Fix null pointer dereference at probe
A previous commit changed the argument list of gpio_fan_get_of_data(), removing the "struct *dev" argument and retrieving it instead from the gpio_fan_data structure. The "dev" entry of gpio_fan_data was then dereferenced to access the of_node field, leading to a kernel panic during the probe as the "dev" entry of the gpio_fan_data structure was not filled yet. Fix this by setting fan_data->dev before calling gpio_fan_get_of_data(). Fixes: 5859d8d30737 ("hwmon: (gpio-fan) Get rid of platform data struct") Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm63.c')
0 files changed, 0 insertions, 0 deletions