]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFC: nfcmrvl: use nfc-device for firmware download
authorJohan Hovold <johan@kernel.org>
Thu, 30 Mar 2017 10:15:38 +0000 (12:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:06:03 +0000 (15:06 -0700)
commit5288f3f80c4c6617d8434bf41a1d3dd19670efb6
treedfb60723aaa01a6687a5d00017b3e3d97aff2aef
parent6e2b65dc2774c407de945585ca2c9e833e1f1ab2
NFC: nfcmrvl: use nfc-device for firmware download

commit e5834ac22948169bbd7c45996d8d4905edd20f5e upstream.

Use the nfc- rather than phy-device in firmware-management code that
needs a valid struct device.

This specifically fixes a NULL-pointer dereference in
nfcmrvl_fw_dnld_init() during registration when the underlying tty is
one end of a Unix98 pty.

Note that the driver still uses the phy device for any debugging, which
is fine for now.

Fixes: 3194c6870158 ("NFC: nfcmrvl: add firmware download support")
Cc: Vincent Cuissard <cuissard@marvell.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nfc/nfcmrvl/fw_dnld.c