mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
FROMGIT: scsi: ufs: ufs-qcom: Drop unnecessary NULL checks
This code path is only called through one function, and the HBA struct is
already accessed in ufshcd_vops_dbg_register_dump() prior to calling so
there is no way for it to be NULL.
Likewise, the print_fn callback is always supplied within this driver and
is always provided.
Change-Id: I7c0b84767d094568e998bcfa11008a2e19c0554b
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Asutosh Das <quic_asutoshd@quicinc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bug: 258234315
(cherry picked from commit 921a880827 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
abfb939cd7
commit
52275e5566
@@ -1202,15 +1202,6 @@ static void ufs_qcom_print_hw_debug_reg_all(struct ufs_hba *hba,
|
||||
u32 reg;
|
||||
struct ufs_qcom_host *host;
|
||||
|
||||
if (unlikely(!hba)) {
|
||||
pr_err("%s: hba is NULL\n", __func__);
|
||||
return;
|
||||
}
|
||||
if (unlikely(!print_fn)) {
|
||||
dev_err(hba->dev, "%s: print_fn is NULL\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
host = ufshcd_get_variant(hba);
|
||||
if (!(host->dbg_print_en & UFS_QCOM_DBG_PRINT_REGS_EN))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user