]> git.baikalelectronics.ru Git - kernel.git/commit
staging: greybus: fix a missing-check bug in gb_lights_light_config()
authorChen Zhou <chenzhou10@huawei.com>
Wed, 1 Apr 2020 03:00:17 +0000 (11:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 06:55:26 +0000 (08:55 +0200)
commitc8beaccc41abae230bb974df791b5425673497fd
tree8f75b61b57a4e8854db96190ad7d9a372718d1fe
parent2dc4821746b00ec306553d4d291ecef34c91b85f
staging: greybus: fix a missing-check bug in gb_lights_light_config()

In gb_lights_light_config(), 'light->name' is allocated by kstrndup().
It returns NULL when fails, add check for it.

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Link: https://lore.kernel.org/r/20200401030017.100274-1-chenzhou10@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/light.c