]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
rfkill: gpio: fix memory leak in probe error path
authorJohan Hovold <johan@kernel.org>
Thu, 26 Apr 2018 07:31:52 +0000 (09:31 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 7 May 2018 13:01:40 +0000 (15:01 +0200)
commit4bf01ca21e2e0e4561d1a03c48c3d740418702db
treeb243a583f6261adff678a69d677e942704436d45
parente8f90c74e6ab64824f3a21521640de7b21050b9d
rfkill: gpio: fix memory leak in probe error path

Make sure to free the rfkill device in case registration fails during
probe.

Fixes: 5e7ca3937fbe ("net: rfkill: gpio: convert to resource managed allocation")
Cc: stable <stable@vger.kernel.org> # 3.13
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/rfkill/rfkill-gpio.c