mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00: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
0fbdd907e4
commit
ae35e16e0a
@@ -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