Skip to contentSkip to conversation

ufs: definitions for phy interface

DISCUSSION Dan Carpenter 1 participant 1 message Oct 2, 2014 SCSI

lore
Share & tools
lore
#0 lore raw

Hello Dolev Raviv,

This is a semi-automatic email about new static checker warnings.

The patch e785060ea3a1: "ufs: definitions for phy interface" from Sep 25, 2014, leads to the following Smatch complaint:

drivers/scsi/ufs/ufshcd.c:5118 ufshcd_system_suspend()
error: we previously assumed 'hba' could be null (see line 5089)

drivers/scsi/ufs/ufshcd.c
5088
5089 if (!hba || !hba->is_powered)

                    ^^^^

Existing check for NULL.

5090 goto out;
5091

[ snip ]

5115 ret = ufshcd_suspend(hba, UFS_SYSTEM_PM);
5116 out:
5117 if (!ret)

  5118			hba->is_sys_suspended = true;
                        ^^^^^^^^^^^^^^^^^^^^^

New unchecked dereference. This is a One Err Bug caused by "out" label style error handling.

5119 return ret;
5120 }

regards,
dan carpenter