diff options
author | Bean Huo <beanhuo@micron.com> | 2023-01-08 23:40:55 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-01-11 22:16:59 -0500 |
commit | 5e87c51f186ef70b17201f97db11044e3e7ffa46 (patch) | |
tree | 91f8566cd3719ef370be349c2c85ca969133ad79 /include/ufs/ufshcd.h | |
parent | 679062c65b2c7824b5bf6cef9d286ef101466122 (diff) | |
download | linux-5e87c51f186ef70b17201f97db11044e3e7ffa46.tar.gz linux-5e87c51f186ef70b17201f97db11044e3e7ffa46.tar.bz2 linux-5e87c51f186ef70b17201f97db11044e3e7ffa46.zip |
scsi: ufs: core: bsg: Fix sometimes-uninitialized warnings
Compilation complains that two possible variables are used without
initialization:
drivers/ufs/core/ufs_bsg.c:112:6: warning: variable 'sg_cnt' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
drivers/ufs/core/ufs_bsg.c:112:6: warning: variable 'sg_list' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
Fix both warnings by adding initialization with sg_cnt = 0, sg_list = NULL.
Fixes: 6ff265fc5ef6 ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg")
Signed-off-by: Bean Huo <beanhuo@micron.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Xiaosen He <quic_xiaosenh@quicinc.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/ufs/ufshcd.h')
0 files changed, 0 insertions, 0 deletions