From: Viresh Kumar Date: Wed, 21 Oct 2015 09:56:43 +0000 (+0530) Subject: greybus: bundle: fix double freeing of bundle structure X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1097 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8d1043a30fc23a3f8a95b972beb694dd948bbe45;p=karo-tx-linux.git greybus: bundle: fix double freeing of bundle structure The bundle will be released by gb_bundle_release() once all references for the bundle are dropped. And so there is no need to free it in the error path specially. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c index 5c09bccf55b8..01745f40f6e6 100644 --- a/drivers/staging/greybus/bundle.c +++ b/drivers/staging/greybus/bundle.c @@ -184,7 +184,6 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, pr_err("failed to add bundle device for id 0x%02hhx\n", bundle_id); put_device(&bundle->dev); - kfree(bundle); return NULL; }