Skip to content
Commit 3e660fbe authored by Akinobu Mita's avatar Akinobu Mita Committed by Christoph Hellwig
Browse files

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: default avatarAkinobu Mita <mita@fixstars.com>
Reviewed-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 97cd6805
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment