]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit04501114ffda09445130ba13fa7cf4a3122bf912
treeaed8d30a3de51bfa7cda7c760ba8d0edb888d961
parent4d5264a4388aa5fb8edfecf453cd30b0e66cb876
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