Skip to contentSkip to conversation

nfc: signedness bug in __nci_request()

PATCH New Dan Carpenter 1 participant 1 message Dec 9, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfc: signedness bug in __nci_request()

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.

net/nfc/nci/core.c +1 -1
index 37de28e..c55f233 100644
@@ -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;