android_kernel_samsung_univ.../drivers/scsi/ufs
Gustavo A. R. Silva d8933268bd scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg
[ Upstream commit 727535903bea924c4f73abb202c4b3e85fff0ca4 ]

_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.

This issue was detected with the help of Coccinelle.

Fixes: aa49761309 ("ufs: Add regulator enable support")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-03 17:04:29 +01:00
..
Kconfig
Makefile
ufs-qcom.c
ufs-qcom.h
ufs.h
ufshcd-pci.c
ufshcd-pltfrm.c
ufshcd-pltfrm.h
ufshcd.c scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg 2018-02-03 17:04:29 +01:00
ufshcd.h
ufshci.h
unipro.h