OSDN Git Service

nfc: s3fwrn5: fix undefined parameter values in dev_err()
authorTang Bin <tangbin@cmss.chinamobile.com>
Tue, 27 Jul 2021 12:25:06 +0000 (20:25 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jul 2021 13:02:11 +0000 (14:02 +0100)
In the function s3fwrn5_fw_download(), the 'ret' is not assigned,
so the correct value should be given in dev_err function.

Fixes: a0302ff5906a ("nfc: s3fwrn5: remove unnecessary label")
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/nfc/s3fwrn5/firmware.c

index eb5d7a5..1340fab 100644 (file)
@@ -423,7 +423,7 @@ int s3fwrn5_fw_download(struct s3fwrn5_fw_info *fw_info)
        if (IS_ERR(tfm)) {
                ret = PTR_ERR(tfm);
                dev_err(&fw_info->ndev->nfc_dev->dev,
-                       "Cannot allocate shash (code=%d)\n", ret);
+                       "Cannot allocate shash (code=%ld)\n", PTR_ERR(tfm));
                goto out;
        }