From: Zubair Lutfullah Kakakhel <[email protected]>
Date: Wed, 14 Jan 2015 10:36:17 +0000

> +     power = devm_regulator_get(dev, "vcc");
> +     if (PTR_ERR(power) == -EPROBE_DEFER)
> +             return -EPROBE_DEFER;
> +     if (IS_ERR(power)) {
> +             dev_dbg(dev, "no regulator provided\n");

I know it may seem silly, but to me it is more logical to always
guard PTR_ERR() uses with IS_ERR().

Therefore could you please restructure this as:

        if (IS_ERR(power)) {
                if (PTR_ERR(power) == -EPROBE_DEFER)
                        return -EPROBE_DEFER;
                else
                        dev_dbg(dev, "no regulator provided\n");
        } else {

Thanks.
--
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/

Reply via email to