]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: gasket: sysfs: clean up state if ENOMEM removing mapping
authorTodd Poynor <toddpoynor@google.com>
Sun, 5 Aug 2018 20:07:35 +0000 (13:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Aug 2018 09:20:06 +0000 (11:20 +0200)
commita81d678949471d5b7f399cfcf2e48e0382427805
tree669e5a74bc7885ad1bc34a570d6fbcdc7a979071
parent2bc7596438aba6d9eacc4fdfac8dd8b22ae4a267
staging: gasket: sysfs: clean up state if ENOMEM removing mapping

If kcalloc() returns NULL in put_mapping(), continue to clean up state,
including dropping the reference on the struct device and free attribute
memory.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gasket/gasket_sysfs.c