[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1461249839-16962-11-git-send-email-michael.thalmeier@hale.at>
Date:	Thu, 21 Apr 2016 16:43:58 +0200
From:	Michael Thalmeier <michael.thalmeier@...e.at>
To:	Samuel Ortiz <sameo@...ux.intel.com>
Cc:	Lauro Ramos Venancio <lauro.venancio@...nbossa.org>,
	Aloisio Almeida Jr <aloisio.almeida@...nbossa.org>,
	linux-kernel@...r.kernel.org, linux-nfc@...ts.01.org,
	michael@...lmeier.at
Subject: [PATCH 10/11] NFC: pn533: set cmd status when not set
When pn533_recv_frame is called with skb = NULL and cmd->status = 0, set
cmd->status to an error code.
Signed-off-by: Michael Thalmeier <michael.thalmeier@...e.at>
---
 drivers/nfc/pn533/pn533.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c
index ae13277..44bc5e0 100644
--- a/drivers/nfc/pn533/pn533.c
+++ b/drivers/nfc/pn533/pn533.c
@@ -2040,6 +2040,8 @@ void pn533_recv_frame(struct pn533 *dev, struct sk_buff *skb, int status)
 
 	if (skb == NULL) {
 		pr_err("NULL Frame -> link is dead\n");
+		if (!dev->cmd->status)
+			dev->cmd->status = -ENOENT;
 		goto sched_wq;
 	}
 
-- 
2.5.5
Powered by blists - more mailing lists
 
