From: Colin Ian King Date: Tue, 7 Feb 2017 11:51:29 +0000 (+0000) Subject: scsi: aacraid: rcode is unsigned and should be signed int X-Git-Tag: v4.14-rc1~1480^2~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76291469772fb932523c2e0003848934cd29e7cb;p=platform%2Fkernel%2Flinux-rpi.git scsi: aacraid: rcode is unsigned and should be signed int 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 Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 3b5ddf4..907f1e8 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -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)