serial: amba-pl011: Fix regulator_get() return check
NULL is used to designate a dummy regulator, so it it should be safe
to use against regulator_enable(). Any value that would retrun true
for IS_ERR(), OTOH, is not. Such value would also pass "if (r)" check
without any problems.

Fix the code to use !IS_ERR() instead.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent c9b2899 commit 7036c933612dc7004b90d7d3c9d1a208d3a22db1
@Andrey Smirnov Andrey Smirnov authored on 13 Dec 2018
Sascha Hauer committed on 17 Dec 2018
Showing 1 changed file
View
drivers/serial/amba-pl011.c