Merge "scsi: ufshcd-qti: Fix null pointer check"

This commit is contained in:
qctecmdr 2020-02-27 00:18:53 -08:00 • committed by Gerrit - the friendly Code Review server
commit 5212d6d3b5

View file

@ -7530,6 +7530,8 @@ static u32 ufshcd_get_max_icc_level(int sup_curr_uA, u32 start_scan, char *buff)
len = start_scan;
pd = kmalloc_array(len, sizeof(*pd), GFP_KERNEL);
if (!pd)
return 0;
memcpy(pd, buff, len);
for (i = start_scan; i >= 0; i--) {