]> git.baikalelectronics.ru Git - kernel.git/commit
power/max8925: freeing wrong variable
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 18 Mar 2016 05:40:16 +0000 (08:40 +0300)
committerSebastian Reichel <sre@kernel.org>
Sun, 10 Apr 2016 15:19:33 +0000 (17:19 +0200)
commit0d48871190a44f6481c377835ab1b84a5dfc41e7
tree07dca32be2ecd1c28bcbd8187b0ea09e9500fa3b
parenta69d3a99a1283fdde5e936f289cf7abe1684327a
power/max8925: freeing wrong variable

We were freeing "info->battery" instead of "info->usb", which leads to
an OOps and a resource leak.

The labels were wonky, "out_battery" did release the battery but out_usb
did not release usb.  I was introducing a call to free usb so it sort
conflicted with existing misleading name.  I renamed them.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/max8925_power.c