mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 16:25:42 -04:00
staging: greybus: light: Release memory obtained by kasprintf
Free memory region, if gb_lights_channel_config is not successful. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
63342e75e6
commit
04820da210
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user