usb: typec: ucsi: ccg: fix memory leak in do_flash
In case memory resources for *fw* were successfully allocated,
release them before return.
Addresses-Coverity-ID: 1445499 ("Resource leak")
Fixes: 5c9ae5a8 ("usb: typec: ucsi: ccg: add firmware flashing support")
Signed-off-by:
Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please register or sign in to comment