]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tty: nozomi: Fix the error handling path of 'nozomi_card_init()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 25 May 2021 18:51:57 +0000 (20:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 15:00:15 +0000 (17:00 +0200)
commit106837de5779200edc4f960ca7c62651e6fd9529
tree4c910e703bf330095e0f97734b7e01ce5e248115
parentcc6f9708e863c6c8a869fa6c76975b85955f99cc
tty: nozomi: Fix the error handling path of 'nozomi_card_init()'

[ Upstream commit 6ae7d0f5a92b9619f6e3c307ce56b2cefff3f0e9 ]

The error handling path is broken and we may un-register things that have
never been registered.

Update the loops index accordingly.

Fixes: 9842c38e9176 ("kfifo: fix warn_unused_result")
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e28c2e92c7475da25b03d022ea2d6dcf1ba807a2.1621968629.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/nozomi.c