scsi: ufs: Fix unsigned int compared with less than zero
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@canonical.com
Fixes: 4728ab4a8e
("scsi: ufs: Remove ufshcd_valid_tag()")
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Addresses-Coverity: ("Macro compares unsigned to 0")
This commit is contained in:
parent
4758fd91d5
commit
a5402cdcc2
|
@ -6974,7 +6974,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
|
|||
{
|
||||
struct Scsi_Host *host = cmd->device->host;
|
||||
struct ufs_hba *hba = shost_priv(host);
|
||||
unsigned int tag = cmd->request->tag;
|
||||
int tag = cmd->request->tag;
|
||||
struct ufshcd_lrb *lrbp = &hba->lrb[tag];
|
||||
unsigned long flags;
|
||||
int err = FAILED;
|
||||
|
|
Loading…
Reference in New Issue