diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-01-13 18:29:54 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2020-01-15 20:31:27 +0100 |
commit | e64175776d06a8ceebbfd349d7e66a4a46ca39ef (patch) | |
tree | b8d15922c1f0e273d80e8449da28ad7e21de1b7c /drivers/bus/ti-sysc.c | |
parent | 24a49678f5e20f18006e71b90ac1531876b27eb1 (diff) | |
download | linux-e64175776d06a8ceebbfd349d7e66a4a46ca39ef.tar.bz2 |
i2c: iop3xx: Fix memory leak in probe error path
When handling devm_gpiod_get_optional() errors, free the memory already
allocated. This fixes Smatch warnings:
drivers/i2c/busses/i2c-iop3xx.c:437 iop3xx_i2c_probe() warn: possible memory leak of 'new_adapter'
drivers/i2c/busses/i2c-iop3xx.c:442 iop3xx_i2c_probe() warn: possible memory leak of 'new_adapter'
Fixes: fdb7e884ad61 ("i2c: iop: Use GPIO descriptors")
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/bus/ti-sysc.c')
0 files changed, 0 insertions, 0 deletions