ubifs: Fix error return code in ubifs_init_authentication()
authorWang ShaoBo <bobo.shaobowang@huawei.com>
Tue, 24 Nov 2020 06:33:20 +0000 (14:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:52 +0000 (11:53 +0100)
commit0cc9725e4b25292b838cc7c3d16dc9520b184926
tree8a04e8fff7ea173e3001c93405ee0a57b29ba315
parent9dc1b44d4f968f1d0df383b1f08a2c58076de9fa
ubifs: Fix error return code in ubifs_init_authentication()

[ Upstream commit 3cded66330591cfd2554a3fd5edca8859ea365a2 ]

Fix to return PTR_ERR() error code from the error handling case where
ubifs_hash_get_desc() failed instead of 0 in ubifs_init_authentication(),
as done elsewhere in this function.

Fixes: 49525e5eecca5 ("ubifs: Add helper functions for authentication support")
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ubifs/auth.c