public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] nfc: signedness bug in __nci_request()
@ 2011-12-09  6:35 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-12-09  6:35 UTC (permalink / raw)
  To: Lauro Ramos Venancio
  Cc: Aloisio Almeida Jr, Samuel Ortiz, John W. Linville, Ilan Elias,
	Paul Gortmaker, linux-wireless, kernel-janitors

wait_for_completion_interruptible_timeout() returns -ERESTARTSYS if
interrupted so completion_rc needs to be signed.  The current code
probably returns -ETIMEDOUT if we hit this situation, but after this
patch is applied it will return -ERESTARTSYS.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 37de28e..c55f233 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -71,7 +71,7 @@ static int __nci_request(struct nci_dev *ndev,
 	__u32 timeout)
 {
 	int rc = 0;
-	unsigned long completion_rc;
+	long completion_rc;
 
 	ndev->req_status = NCI_REQ_PEND;
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-09  6:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09  6:35 [patch] nfc: signedness bug in __nci_request() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox