Re: [PATCH 5/7] mmc: tmio: add regulator support

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

 



On Tue, Apr 24, 2012 at 06:41:45PM +0200, Guennadi Liakhovetski wrote:

> +	host->vdd = regulator_get(mmc_dev(mmc), "SD Vdd");
> +	if (IS_ERR(host->vdd)) {
> +		host->vdd = NULL;
> +	} else {

This silently ignoring errors really isn't good practice :(

> @@ -1052,6 +1079,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
>  
>  	pm_runtime_put_sync(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
> +	regulator_put(host->vdd);

devm_regulator_get() is there now.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux