On Wed 2020-07-08 23:45:49, Chen-Yu Tsai (Moxa) wrote:
From: Viresh Kumar <viresh.kumar@...>
commit 0c717d0f9cb46259dce5272705adce64a2d646d9 upstream.
We are currently required to do two checks for regulator pointer:
IS_ERR() and IS_NULL().
And multiple instances are reported, about both of these not being used
consistently and so resulting in crashes.
Fix that by initializing regulator pointer with an error value and
checking it only against an error.
This makes code more consistent and more efficient.
Again, this should be close to (or merged with) patch 2/ of the series.
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany