]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
scsi: aacraid: rcode is unsigned and should be signed int
authorColin Ian King <colin.king@canonical.com>
Tue, 7 Feb 2017 11:51:29 +0000 (11:51 +0000)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 1 Mar 2017 13:15:11 +0000 (07:15 -0600)
BugLink: http://bugs.launchpad.net/bugs/1668726
aac_fib_send can return -ve error returns and hence rcode should be
signed. Currently the rcode >= 0 check is always true and -ve errors are
not being checked.

Thanks to Dan Carpenter for spotting my original broken fix to this
issue.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from linux-next commit 76291469772fb932523c2e0003848934cd29e7cb)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/aacraid/aachba.c

index 3b5ddf430723bec005fcc3d75613e199b2c436c3..907f1e80665b1c3302cb42f38ae69e9992fca314 100644 (file)
@@ -1798,7 +1798,7 @@ int aac_report_phys_luns(struct aac_dev *dev, struct fib *fibptr, int rescan)
        struct sgmap64 *sg64;
        dma_addr_t addr;
        u32 vbus, vid;
-       u32 rcode = 0;
+       int rcode = 0;
 
        /* Thor SA Firmware -> CISS_REPORT_PHYSICAL_LUNS */
        fibsize = sizeof(struct aac_srb) - sizeof(struct sgentry)