From: Colin Ian King <colin.king@xxxxxxxxxxxxx> [ Upstream commit a5402cdcc2a925835db89ea336909b2b724189df ] Variable 'tag' is currently an unsigned int and is being compared to less than zero, this check is always false. Fix this by making 'tag' an int. Link: https://lore.kernel.org/r/20210806144301.19864-1-colin.king@xxxxxxxxxxxxx Fixes: 4728ab4a8e64 ("scsi: ufs: Remove ufshcd_valid_tag()") Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Addresses-Coverity: ("Macro compares unsigned to 0") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 1708d7ced527..8275127749d2 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6969,7 +6969,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) struct Scsi_Host *host; struct ufs_hba *hba; unsigned long flags; - unsigned int tag; + int tag; int err = FAILED; struct ufshcd_lrb *lrbp; u32 reg; -- 2.30.2