nvmem: core: Avoid useless iterations in nvmem_cell_get_from_lookup()
authorAlban Bedel <albeu@free.fr>
Mon, 28 Jan 2019 15:55:06 +0000 (15:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 15:24:15 +0000 (16:24 +0100)
commit9bfd8198ba948e11a0f9c618db00b0d4020b71c5
treeaed8d30a3de51bfa7cda7c760ba8d0edb888d961
parent73e9dc4d568f050858e027655f0b0f6ddf65d6aa
nvmem: core: Avoid useless iterations in nvmem_cell_get_from_lookup()

Once the correct cell has been found there is no need to continue
iterating, just stop there. While at it replace the goto used to leave
the loop with simple break statements.

Signed-off-by: Alban Bedel <albeu@free.fr>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c