Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ufs: fix NULL dereference when no regulators are defined
If no voltage supply regulators are defined for the UFS devices (assumed they are always-on), ufshcd_config_vreg_load() can be called on suspend/resume paths with vreg == NULL as hba->vreg_info.vcc* equal to NULL, and it causes NULL pointer dereference. This fixes it by making ufshcd_config_vreg_{h,l}pm noop when no regulators are defined. Signed-off-by: Akinobu Mita <[email protected]> Reviewed-by: Subhash Jadavani <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
- Loading branch information