Commit 04820da2 authored by Arvind Yadav's avatar Arvind Yadav Committed by Greg Kroah-Hartman

staging: greybus: light: Release memory obtained by kasprintf

Free memory region, if gb_lights_channel_config is not successful.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 63342e75
......@@ -925,6 +925,8 @@ static void __gb_lights_led_unregister(struct gb_channel *channel)
return;
led_classdev_unregister(cdev);
kfree(cdev->name);
cdev->name = NULL;
channel->led = NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment