mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 13:59:45 -04:00
greybus: interface: fix double freeing of interface structure
The interface will be released by gb_interface_release() once all references for the interface are dropped. And so there is no need to free it in the error path specially. Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8d1043a30f
commit
63e8a14b1f
@@ -167,7 +167,6 @@ struct gb_interface *gb_interface_create(struct greybus_host_device *hd,
|
||||
|
||||
free_intf:
|
||||
put_device(&intf->dev);
|
||||
kfree(intf);
|
||||
put_module:
|
||||
put_device(&module->dev);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user