From: Jiapeng Chong Date: Fri, 24 Sep 2021 09:51:53 +0000 (+0800) Subject: scsi: ses: Fix unsigned comparison with less than zero X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a155b6918701c70f56dcccdc833929aafbd4c6ba;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git scsi: ses: Fix unsigned comparison with less than zero [ Upstream commit dd689ed5aa905daf4ba4c99319a52aad6ea0a796 ] 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 Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 69046d342bc5..39396548f9b5 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -120,7 +120,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,