Files
twx-linux/drivers/scsi
Gustavo A. R. Silva d8933268bd scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg
[ Upstream commit 727535903b ]

_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
..
2016-04-12 09:08:39 -07:00
2017-12-25 14:22:14 +01:00
…
2015-11-09 17:11:57 -08:00
2017-04-08 09:53:31 +02:00
2017-03-18 19:09:58 +08:00
…
2015-11-12 07:06:18 -05:00
2015-04-27 10:10:19 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:05:55 -07:00
2015-04-27 10:05:55 -07:00
2016-07-27 09:47:39 -07:00
…
…
…
…
…
…
…
2015-12-03 09:32:33 -08:00
…
…
…
…
…
2015-07-31 13:31:10 +02:00
…
…
…
…
2015-11-09 17:11:57 -08:00
…
2015-11-09 16:32:14 -08:00
…
…
…
…
2015-12-03 09:32:33 -08:00
2018-01-23 19:50:15 +01:00
2017-12-20 10:04:55 +01:00
…
…
…
…
2015-11-09 19:32:41 -05:00
2015-06-02 17:24:54 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-11-12 07:06:18 -05:00
…
…
…
2016-10-28 03:01:31 -04:00
2015-11-09 17:11:57 -08:00
…
…
2018-01-23 19:50:14 +01:00
…
…
2017-04-21 09:30:05 +02:00
…
2015-12-03 09:32:33 -08:00
2015-06-02 08:03:25 -07:00
2015-11-09 17:42:19 -08:00
…
…
…
…
…
…
…
…