From 8d1043a30fc23a3f8a95b972beb694dd948bbe45 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Wed, 21 Oct 2015 15:26:43 +0530 Subject: [PATCH] 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 --- drivers/staging/greybus/bundle.c | 1 - 1 file changed, 1 deletion(-) 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; } -- 2.7.4