Skip to content
Commit ef113570 authored by Evgeny Novikov's avatar Evgeny Novikov Committed by Mauro Carvalho Chehab
Browse files

HID: amd_sfh: Fix potential NULL pointer dereference



devm_add_action_or_reset() can suddenly invoke amd_mp2_pci_remove() at
registration that will cause NULL pointer dereference since
corresponding data is not initialized yet. The patch moves
initialization of data before devm_add_action_or_reset().

Found by Linux Driver Verification project (linuxtesting.org).

[jkosina@suse.cz: rebase]
Signed-off-by: default avatarEvgeny Novikov <novikov@ispras.ru>
Acked-by: default avatarBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 94f9c356
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment