Skip to content
Commit 163478da authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Mark Brown
Browse files

regulator: core: have regulator_dev_lookup() return ERR_PTR-encoded errors



Instead of returning both regulator_dev structure as return value and
auxiliary error code in 'ret' argument, let's switch to using ERR_PTR
encoded values. This makes it more obvious what is going on at call sites.

Also, let's not unlock the mutex in the middle of a loop, but rather break
out and have single unlock path.

Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d1642ea7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment