Commit 48f703d6 authored by Dan Carpenter's avatar Dan Carpenter Committed by Sebastian Reichel
Browse files

power: supply: max1720x: fix a double free on error in probe()



In this code, if devm_add_action_or_reset() fails, it will call
max1720x_unregister_ancillary() which in turn calls
i2c_unregister_device().  Thus the call to i2c_unregister_device() on the
following line is not required and is a double unregister.  Delete it.

Fixes: 47271a93 ("power: supply: max1720x: add read support for nvmem")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/9c2f76e7-5679-473b-9b9c-e11b492b96ac@stanley.mountain


Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 66257670
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment