* Patch "NFC: nfcmrvl: use nfc-device for firmware download" has been added to the 4.9-stable tree
@ 2017-07-22 13:02 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-22 13:02 UTC (permalink / raw)
To: johan, cuissard, gregkh, sameo; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
NFC: nfcmrvl: use nfc-device for firmware download
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nfc-nfcmrvl-use-nfc-device-for-firmware-download.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From e5834ac22948169bbd7c45996d8d4905edd20f5e Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@kernel.org>
Date: Thu, 30 Mar 2017 12:15:38 +0200
Subject: NFC: nfcmrvl: use nfc-device for firmware download
From: Johan Hovold <johan@kernel.org>
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 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/nfc/nfcmrvl/fw_dnld.c
+++ b/drivers/nfc/nfcmrvl/fw_dnld.c
@@ -459,7 +459,7 @@ int nfcmrvl_fw_dnld_init(struct nfcmrvl_
INIT_WORK(&priv->fw_dnld.rx_work, fw_dnld_rx_work);
snprintf(name, sizeof(name), "%s_nfcmrvl_fw_dnld_rx_wq",
- dev_name(priv->dev));
+ dev_name(&priv->ndev->nfc_dev->dev));
priv->fw_dnld.rx_wq = create_singlethread_workqueue(name);
if (!priv->fw_dnld.rx_wq)
return -ENOMEM;
@@ -496,6 +496,7 @@ int nfcmrvl_fw_dnld_start(struct nci_dev
{
struct nfcmrvl_private *priv = nci_get_drvdata(ndev);
struct nfcmrvl_fw_dnld *fw_dnld = &priv->fw_dnld;
+ int res;
if (!priv->support_fw_dnld)
return -ENOTSUPP;
@@ -511,7 +512,9 @@ int nfcmrvl_fw_dnld_start(struct nci_dev
*/
/* Retrieve FW binary */
- if (request_firmware(&fw_dnld->fw, firmware_name, priv->dev) < 0) {
+ res = request_firmware(&fw_dnld->fw, firmware_name,
+ &ndev->nfc_dev->dev);
+ if (res < 0) {
nfc_err(priv->dev, "failed to retrieve FW %s", firmware_name);
return -ENOENT;
}
Patches currently in stable-queue which might be from johan@kernel.org are
queue-4.9/nfc-nfcmrvl-use-nfc-device-for-firmware-download.patch
queue-4.9/nfc-nfcmrvl-fix-firmware-management-initialisation.patch
queue-4.9/nfc-nfcmrvl-do-not-use-device-managed-resources.patch
queue-4.9/thermal-max77620-fix-device-node-reference-imbalance.patch
queue-4.9/nfc-nfcmrvl_uart-add-missing-tty-device-sanity-check.patch
queue-4.9/nfc-fix-broken-device-allocation.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-22 13:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-22 13:02 Patch "NFC: nfcmrvl: use nfc-device for firmware download" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).