summaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorRasmus Villemoes2016-02-08 22:04:29 +0100
committerGreg Kroah-Hartman2016-02-12 04:23:28 +0100
commitdfdf141429f0895b63c882facc42c86f225033cb (patch)
tree576a34af40f311d2b82b1857cb5b016eafd6b874 /drivers/w1
parentchar: nwbutton: avoid unused variable warning (diff)
downloadkernel-qcow2-linux-dfdf141429f0895b63c882facc42c86f225033cb.tar.gz
kernel-qcow2-linux-dfdf141429f0895b63c882facc42c86f225033cb.tar.xz
kernel-qcow2-linux-dfdf141429f0895b63c882facc42c86f225033cb.zip
nvmem: core: fix error path in nvmem_add_cells()
The current code fails to nvmem_cell_drop(cells[0]) - even worse, if the loop above fails already at i==0, we'll enter an essentially infinite loop doing nvmem_cell_drop on cells[-1], cells[-2], ... which is unlikely to end well. Also, we're not freeing the temporary backing array cells on the error path. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
0 files changed, 0 insertions, 0 deletions