]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
regulator: core: remove dead code in _regulator_get()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 3 Feb 2017 21:56:00 +0000 (13:56 -0800)
committerMark Brown <broonie@kernel.org>
Sat, 4 Feb 2017 10:25:07 +0000 (11:25 +0100)
commit7d245afa24b3ed911f6fd90079d70932ac5e5923
tree8327b3a5405b6757b0c3ed7f12d118394cef35a7
parentd00b74613fb18dfd0a5aa99270ee2e72d5c808d7
regulator: core: remove dead code in _regulator_get()

There is no point in assigning value to 'ret' before calling
regulator_dev_lookup() as it will clobber 'ret' anyway.

Also, let's explicitly return -PROBE_DEFER when try_module_get() fails,
instead of relying that earlier initialization of "regulator" carries
correct value.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c