leds: tlc591xx: fix return value check in tlc591xx_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 6 Apr 2021 13:11:59 +0000 (21:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:05:37 +0000 (16:05 +0200)
commit164a3880a76a24df9555669af72410fc745c233d
tree7ace7761e576ad1fa53b56633fc1050f4541c333
parent9ebcc60565f2667a72d1f44289c71e097f632d43
leds: tlc591xx: fix return value check in tlc591xx_probe()

[ Upstream commit ee522bcf026ec82ada793979c3a906274430595a ]

After device_get_match_data(), tlc591xx is not checked, add
check for it and also check np after dev_of_node.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/leds/leds-tlc591xx.c