]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
video: fbdev: atmel_lcdfb: fix return error code in atmel_lcdfb_of_init()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 17 Nov 2020 06:13:50 +0000 (14:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:25:54 +0000 (11:25 +0100)
commit44ce61c8bda4b0c94e3536625aa1a54ee6d98f9a
tree07ee88fe8aa5fa92164a6deedd5ab4f5106306b6
parent965209a3d0aa4e7c647db9fcaa6799529b285b1f
video: fbdev: atmel_lcdfb: fix return error code in atmel_lcdfb_of_init()

[ Upstream commit ba236455ee750270f33998df57f982433cea4d8e ]

If devm_kzalloc() failed after the first time, atmel_lcdfb_of_init()
can't return -ENOMEM, fix this by putting the error code in loop.

Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20201117061350.3453742-1-yangyingliang@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/atmel_lcdfb.c