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.14-rc1~2366^2~378^2~21^2~1097 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d1043a30fc23a3f8a95b972beb694dd948bbe45;p=platform%2Fkernel%2Flinux-rpi.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 5c09bcc..01745f4 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; }