Commit 63e8a14b authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 8d1043a3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;