[ Upstream commit 966cca72ab20289083521a385fa56035d85a222d ]
Currently rbtn_add() in case of failure is leaking resources. Fix this
by adding a proper rollback. Move devm_kzalloc() before rbtn_acquire(),
so it doesn't require rollback in case of failure. While at it, remove
unnecessary assignment of NULL to device->driver_data and unnecessary
whitespace, plus add a break for the default case in a switch.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Suggested-by: Pali Rohár <pali@kernel.org>
Fixes:
|
||
---|---|---|
.. | ||
chrome | ||
goldfish | ||
loongarch | ||
mellanox | ||
mips | ||
olpc | ||
surface | ||
x86 | ||
Kconfig | ||
Makefile |