summaryrefslogtreecommitdiff
path: root/drivers/mfd/tps65911-comparator.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-10-29 15:47:22 +0100
committerLee Jones <lee.jones@linaro.org>2013-11-11 11:22:17 +0000
commit0b208e41acf34c133a55a57189af30aa7924e0c6 (patch)
treeaa8f813eb55219b8a57260c9408478829e4d9ad6 /drivers/mfd/tps65911-comparator.c
parent03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 (diff)
downloadlinux-next-0b208e41acf34c133a55a57189af30aa7924e0c6.tar.gz
mfd: Fix memory leak in mfd_add_devices()
If the first call to mfd_add_device() fails, no child devices have been registered to the parent yet, and thus mfd_remove_devices() won't find anything to remove nor free. Hence the previously allocated array of atomic_t objects will leak. Free the array instead of calling mfd_remove_devices() on failure during the first loop iteration to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/tps65911-comparator.c')
0 files changed, 0 insertions, 0 deletions