Le 03/10/2015 07:26, Neil Armstrong a écrit :
> If no switch were found in dsa_setup_dst, return -ENODEV and
> exit the dsa_probe cleanly.
>
> Tested-by: Andrew Lunn <[email protected]>
> Tested-by: Florian Fainelli <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---
[snip]
> static int dsa_probe(struct platform_device *pdev)
> @@ -926,9 +937,9 @@ static int dsa_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, dst);
>
> - dsa_setup_dst(dst, dev, &pdev->dev, pd);
> -
> - return 0;
> + ret = dsa_setup_dst(dst, dev, &pdev->dev, pd);
> + if (!ret)
> + return 0;
That logic is a little weird, I would just go with something like this:
ret = dsa_setup_dst(ds, dev, &pdev->dev, pd);
if (ret)
goto out;
return 0;
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/