Skip to content

Commit

Permalink
scsi: ses: Fix unsigned comparison with less than zero
Browse files Browse the repository at this point in the history
[ Upstream commit dd689ed ]

Fix the following coccicheck warning:

./drivers/scsi/ses.c:137:10-16: WARNING: Unsigned expression compared
with zero: result > 0.

Link: https://lore.kernel.org/r/1632477113-90378-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Jiapeng Chong authored and Greg Kroah-Hartman committed Oct 17, 2021
1 parent 83d857d commit 1ff5ee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/ses.c
Original file line number Diff line number Diff line change
@@ -118,7 +118,7 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code,
static int ses_send_diag(struct scsi_device *sdev, int page_code,
void *buf, int bufflen)
{
u32 result;
int result;

unsigned char cmd[] = {
SEND_DIAGNOSTIC,

0 comments on commit 1ff5ee9

Please sign in to comment.