Re: [PATCH] scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg

From: Gustavo A. R. Silva
Date: Wed Nov 22 2017 - 09:19:00 EST



On 11/21/2017 10:01 PM, Martin K. Petersen wrote:
Gustavo A.,

_vreg_ is being dereferenced before it is null checked, hence there is a
potential null pointer dereference.

Fix this by moving the pointer dereference after _vreg_ has been null
checked.
Applied to 4.15/scsi-fixes, thank you!


Glad to help. :)

Thanks
--
Gustavo A. R. Silva