diff options
| author | Colin Ian King <[email protected]> | 2021-08-06 15:43:01 +0100 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2021-08-09 23:14:52 -0400 |
| commit | a5402cdcc2a925835db89ea336909b2b724189df (patch) | |
| tree | a7d375e65f47deadfc1f6a2acdfdbe9ddbe7f810 | |
| parent | 4758fd91d5a07d46be1101d6d47b289ed5d904d0 (diff) | |
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/[email protected]
Fixes: 4728ab4a8e64 ("scsi: ufs: Remove ufshcd_valid_tag()")
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Addresses-Coverity: ("Macro compares unsigned to 0")
| -rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 6c263e94144b..38cf516b0c6d 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -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; |