From: Akinobu Mita Date: Tue, 18 Nov 2014 14:02:46 +0000 (+0900) Subject: ufs: fix NULL dereference when no regulators are defined X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~54^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e660fbef96f53d01ba022b1b75b72759a02983e;p=pandora-kernel.git 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 Reviewed-by: Subhash Jadavani Signed-off-by: Christoph Hellwig --- Reading git-diff-tree failed