Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xen-pciback: Fix return in pm_ctrl_init()

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>

authored by

YueHaibing and committed by
Boris Ostrovsky
4745ea26 9a58b352

+1 -1
+1 -1
drivers/xen/xen-pciback/conf_space_capability.c
··· 160 160 } 161 161 162 162 out: 163 - return ERR_PTR(err); 163 + return err ? ERR_PTR(err) : NULL; 164 164 } 165 165 166 166 static const struct config_field caplist_pm[] = {