* [PATCH] scsi: ufs: fix: NULL pointer dereference
@ 2021-01-27 8:49 Abaci Team
2021-01-27 8:59 ` Avri Altman
0 siblings, 1 reply; 2+ messages in thread
From: Abaci Team @ 2021-01-27 8:49 UTC (permalink / raw)
To: jejb
Cc: martin.petersen, alim.akhtar, avri.altman, linux-scsi,
linux-kernel, Abaci Team
Fix below warnings reported by coccicheck:
./drivers/scsi/ufs/ufshcd.c:8990:11-17: ERROR: hba is NULL but
dereferenced.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Suggested-by: Yang Li <oswb@linux.alibaba.com>
Signed-off-by: Abaci Team <abaci-bugfix@linux.alibaba.com>
---
drivers/scsi/ufs/ufshcd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index fb32d12..9319251 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -8990,7 +8990,6 @@ int ufshcd_system_resume(struct ufs_hba *hba)
ktime_t start = ktime_get();
if (!hba) {
- up(&hba->eh_sem);
return -EINVAL;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] scsi: ufs: fix: NULL pointer dereference
2021-01-27 8:49 [PATCH] scsi: ufs: fix: NULL pointer dereference Abaci Team
@ 2021-01-27 8:59 ` Avri Altman
0 siblings, 0 replies; 2+ messages in thread
From: Avri Altman @ 2021-01-27 8:59 UTC (permalink / raw)
To: Abaci Team, jejb; +Cc: martin.petersen, alim.akhtar, linux-scsi, linux-kernel
>
> Fix below warnings reported by coccicheck:
> ./drivers/scsi/ufs/ufshcd.c:8990:11-17: ERROR: hba is NULL but
> dereferenced.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Suggested-by: Yang Li <oswb@linux.alibaba.com>
> Signed-off-by: Abaci Team <abaci-bugfix@linux.alibaba.com>
This was already fix in commit fb7afe24ba1b (scsi: ufs: Fix a possible NULL pointer issue)
> ---
> drivers/scsi/ufs/ufshcd.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index fb32d12..9319251 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -8990,7 +8990,6 @@ int ufshcd_system_resume(struct ufs_hba *hba)
> ktime_t start = ktime_get();
>
> if (!hba) {
> - up(&hba->eh_sem);
> return -EINVAL;
> }
>
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-27 9:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 8:49 [PATCH] scsi: ufs: fix: NULL pointer dereference Abaci Team
2021-01-27 8:59 ` Avri Altman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.