]> www.infradead.org Git - users/jedix/linux-maple.git/commit
HID: amd_sfh: Fix warning unwind goto
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Mon, 2 Jan 2023 16:30:42 +0000 (22:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:06 +0000 (08:34 +0100)
commitc2c3a71200c0fadf4ccaf380fef06a84cc80339c
treedeb6087c6506e230e2f3f6f18fef1ae6d1cb3cac
parentfa5ee1bec7c7e880d2463f26cf5b66186f8530f5
HID: amd_sfh: Fix warning unwind goto

[ Upstream commit 2a33ad4a0ba5a527b92aeef9a313aefec197fe28 ]

Return directly instead of using existing goto will not cleanup
previously allocated resources. Hence replace return with goto
to fix warning unwind goto which cleanups previously allocated
resources.

Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/amd-sfh-hid/amd_sfh_client.c
drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c