Re: [PATCH] iio: ak8975: add Vid regulator, use optional API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/16/2016 05:35 PM, Linus Walleij wrote:
[...]
> +	data->vdd = devm_regulator_get_optional(&client->dev, "vdd");
> +	if (!IS_ERR(data->vdd)) {

This ignores all errors silently and among other things breaks probe
deferral for the regulators.

>  		ret = regulator_enable(data->vdd);
> +		if (ret) {
> +			dev_warn(&client->dev,
> +				 "Failed to enable specified Vdd supply\n");
> +			return ret;
> +		}
>  	}

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux