commit | de91c16944614421a923431c766cb0ce5b2ff896 | [log] [tgz] |
---|---|---|
author | Peng Fan <peng.fan@nxp.com> | Thu May 11 17:34:14 2017 +0800 |
committer | Stefano Babic <sbabic@denx.de> | Thu May 18 11:24:34 2017 +0200 |
tree | 0ea2cde02d112c55d296238db7b0aaea7f0b5980 | |
parent | 2d96e459d2d5d989ca03cce8dba0f69e81818d6e [diff] |
pinctrl: imx: fix memory leak Each time set_state is called, a new piece memory will be allocated for pin_data, but not freed, this will incur memory leak. When error, the devm API could not free memory automatically. So need call devm_kfree when error. Issue reported by Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefan Agner <stefan.agner@toradex.com> Cc: Stefano Babic <sbabic@denx.de>