regulator: qcom_rpm-regulator: add NULL check on of_match_device() return value
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Fri, 7 Jul 2017 05:29:58 +0000 (00:29 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 7 Jul 2017 12:42:03 +0000 (13:42 +0100)
commit2f2472baa66ef9a6aa25124cb07679bbe613ceff
tree93518a72aee34f642dc06656bd523444b228d2da
parent8d67f64f7739464c352d4b167ed1748f3b2c1f44
regulator: qcom_rpm-regulator: add NULL check on of_match_device() return value

Check return value from call to of_match_device()
in order to prevent a NULL pointer dereference.

In case of NULL print error message and return.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_rpm-regulator.c