NFC: set info->ram_patch to NULL when it is released
authorColin Ian King <colin.king@canonical.com>
Tue, 22 Mar 2016 23:17:00 +0000 (23:17 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 4 Jul 2016 10:11:54 +0000 (12:11 +0200)
When info->ram_patch is released info->otp_patch is being set
to NULL rather than info->ram_patch. I believe this is a cut-n-paste
bug from almost identical code proceeding it that uses the same
idiom for info->otp_patch.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/fdp/fdp.c

index e44a7a2..d93d314 100644 (file)
@@ -345,7 +345,7 @@ static void fdp_nci_release_firmware(struct nci_dev *ndev)
 
        if (info->ram_patch) {
                release_firmware(info->ram_patch);
-               info->otp_patch = NULL;
+               info->ram_patch = NULL;
        }
 }