Commit 9282690
HID: intel-ish-hid: ipc: Fix dev_err usage with uninitialized dev->devc
The variable dev->devc in ish_dev_init was utilized by dev_err before it
was properly assigned. To rectify this, the assignment of dev->devc has
been moved to immediately follow memory allocation.
Without this change "(NULL device *)" is printed for device information.
Fixes: 8ae2f2b ("HID: intel-ish-hid: ipc: Fix potential use-after-free in work function")
Fixes: ae02e5d ("HID: intel-ish-hid: ipc layer")
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>1 parent 9c0f59e commit 9282690
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
| 951 | + | |
951 | 952 | | |
952 | 953 | | |
953 | 954 | | |
| |||
983 | 984 | | |
984 | 985 | | |
985 | 986 | | |
986 | | - | |
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
| |||
0 commit comments