mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
staging: greybus: light: Release memory obtained by kasprintf
[ Upstream commit 04820da210 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4bf42a2ec1
commit
bb0618ac23
@@ -924,6 +924,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