Re: [PATCH] regulator: fixed: Prevent NULL pointer dereference when !CONFIG_OF

2019-10-07 Thread Guenter Roeck
On Sun, Sep 22, 2019 at 10:29:28AM +0800, Axel Lin wrote: > Use of_device_get_match_data which has NULL test for match before > dereference match->data. Add NULL test for drvtype so it still works > for fixed_voltage_ops when !CONFIG_OF. > > Signed-off-by: Axel Lin > Reviewed-by: Philippe

Re: [PATCH] regulator: fixed: Prevent NULL pointer dereference when !CONFIG_OF

2019-09-23 Thread Philippe Schenker
On Sun, 2019-09-22 at 10:29 +0800, Axel Lin wrote: > Use of_device_get_match_data which has NULL test for match before > dereference match->data. Add NULL test for drvtype so it still works > for fixed_voltage_ops when !CONFIG_OF. > > Signed-off-by: Axel Lin Reviewed-by: Philippe Schenker >

[PATCH] regulator: fixed: Prevent NULL pointer dereference when !CONFIG_OF

2019-09-21 Thread Axel Lin
Use of_device_get_match_data which has NULL test for match before dereference match->data. Add NULL test for drvtype so it still works for fixed_voltage_ops when !CONFIG_OF. Signed-off-by: Axel Lin --- drivers/regulator/fixed.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff