]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
maple: fix wrong return value of maple_bus_init().
authorLu Wei <luwei32@huawei.com>
Thu, 26 Nov 2020 02:43:11 +0000 (10:43 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 13 Jan 2022 17:42:55 +0000 (18:42 +0100)
commit69723a5cbe1fa9051deed039768231596db971c0
treeecb5828509a3a2d90d9e885367d38e1c882185d9
parent72a3834870f58487059155c3d609d869e5165d35
maple: fix wrong return value of maple_bus_init().

BugLink: https://bugs.launchpad.net/bugs/1954834
[ Upstream commit bde82ee391fa6d3ad054313c4aa7b726d32515ce ]

If KMEM_CACHE or maple_alloc_dev failed, the maple_bus_init() will return 0
rather than error, because the retval is not changed after KMEM_CACHE or
maple_alloc_dev failed.

Fixes: 17be2d2b1c33 ("sh: Add maple bus support for the SEGA Dreamcast.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Rich Felker <dalias@libc.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/sh/maple/maple.c