Re: [PATCH v4 3/4] scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to analyze

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/12/2024 3:30 PM, Bart Van Assche wrote:
In ufshcd_uic_cmd_compl(), there is code that dereferences 'cmd' with
and without checking the 'cmd' pointer. This confuses static source code
analyzers like Coverity and sparse. Since none of the code in
ufshcd_uic_cmd_compl() can do anything useful if 'cmd' is NULL, move the
'cmd' test near the start of this function.

Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>


  	if (ufshcd_is_auto_hibern8_error(hba, intr_status))
  		hba->errors |= (UFSHCD_UIC_HIBERN8_MASK & intr_status);

Hi Bart, while you are at it, there are extra parenthesis here too.

Reviewed-by: Bao D. Nguyen <quic_nguyenb@xxxxxxxxxxx>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux