Commit 0bd6678
hwmon: (pmbus_core) Fix NULL pointer dereference
Pass i2c_client to _pmbus_is_enabled to drop the assumption
that a regulator device is passed in.
This will fix the issue of a NULL pointer dereference when called from
_pmbus_get_flags.
Fixes: df5f6b6 ("hwmon: (pmbus/core) Generalise pmbus get status")
Cc: stable@vger.kernel.org # v6.4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20230725125428.3966803-2-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>1 parent 55aab08 commit 0bd6678
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2745 | 2745 | | |
2746 | 2746 | | |
2747 | 2747 | | |
2748 | | - | |
| 2748 | + | |
2749 | 2749 | | |
2750 | | - | |
2751 | 2750 | | |
2752 | 2751 | | |
2753 | 2752 | | |
| |||
2758 | 2757 | | |
2759 | 2758 | | |
2760 | 2759 | | |
2761 | | - | |
| 2760 | + | |
2762 | 2761 | | |
2763 | | - | |
2764 | 2762 | | |
2765 | 2763 | | |
2766 | 2764 | | |
2767 | 2765 | | |
2768 | | - | |
| 2766 | + | |
2769 | 2767 | | |
2770 | 2768 | | |
2771 | 2769 | | |
| |||
2844 | 2842 | | |
2845 | 2843 | | |
2846 | 2844 | | |
2847 | | - | |
| 2845 | + | |
2848 | 2846 | | |
2849 | 2847 | | |
2850 | 2848 | | |
| |||
2898 | 2896 | | |
2899 | 2897 | | |
2900 | 2898 | | |
2901 | | - | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
2902 | 2903 | | |
2903 | 2904 | | |
2904 | 2905 | | |
| |||
0 commit comments