>>> On 16.08.17 at 14:52, <jgr...@suse.com> wrote:
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -149,17 +149,18 @@ static struct phantom_dev {
>  } phantom_devs[8];
>  static unsigned int nr_phantom_devs;
>  
> -static void __init parse_phantom_dev(char *str) {
> +static int __init parse_phantom_dev(const char *str)
> +{
>      const char *s = str;
>      unsigned int seg, bus, slot;
>      struct phantom_dev phantom;
>  
>      if ( !s || !*s || nr_phantom_devs >= ARRAY_SIZE(phantom_devs) )
> -        return;
> +        return -EINVAL;

I think you want to split the conditional and return e.g. -E2BIG for
there being too many devices. You could then at once drop the
pointless !s.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to