]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen-pciback: Fix return in pm_ctrl_init()
authorYueHaibing <yuehaibing@huawei.com>
Fri, 8 Oct 2021 07:44:17 +0000 (15:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Nov 2021 10:04:37 +0000 (11:04 +0100)
commit40804b6959fa3cac218e7961997ba8c3d5263697
tree546720df6998c74e872848a0d9b863793736ac6d
parent3612fdf488d5130e716aaab87b2cfdd0d2d4f89a
xen-pciback: Fix return in pm_ctrl_init()

[ Upstream commit 4745ea2628bb43a7ec34b71763b5a56407b33990 ]

Return NULL instead of passing to ERR_PTR while err is zero,
this fix smatch warnings:
drivers/xen/xen-pciback/conf_space_capability.c:163
 pm_ctrl_init() warn: passing zero to 'ERR_PTR'

Fixes: a92336a1176b ("xen/pciback: Drop two backends, squash and cleanup some code.")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20211008074417.8260-1-yuehaibing@huawei.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/xen/xen-pciback/conf_space_capability.c