nfc: signedness bug in __nci_request()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 9 Dec 2011 06:35:39 +0000 (09:35 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 12 Dec 2011 19:23:27 +0000 (14:23 -0500)
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/nfc/nci/core.c

index 4047e29acb3b0f1eeac3d030c8ae7642399d80f1..25dae3f8f5c2d15e5531caa5bafd59815ade52bb 100644 (file)
@@ -68,7 +68,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;