[U-Boot] [PATCH 2/2] mmc: sh_mmcif: Fix warning by unused variable

Pantelis Antoniou panto at antoniou-consulting.com
Mon Mar 31 08:45:34 CEST 2014


Hi Nobuhiro,

Thanks for catching this.

On Mar 31, 2014, at 8:54 AM, Nobuhiro Iwamatsu wrote:

> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
> Reported-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> ---
> drivers/mmc/sh_mmcif.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
> index ad5b23c..ed83a14 100644
> --- a/drivers/mmc/sh_mmcif.c
> +++ b/drivers/mmc/sh_mmcif.c
> @@ -588,13 +588,12 @@ static struct mmc_config sh_mmcif_cfg = {
> 
> int mmcif_mmc_init(void)
> {
> -	int ret = 0;
> 	struct mmc *mmc;
> 	struct sh_mmcif_host *host = NULL;
> 
> 	host = malloc(sizeof(struct sh_mmcif_host));
> 	if (!host)
> -		ret = -ENOMEM;
> +		return -ENOMEM;
> 	memset(host, 0, sizeof(*host));
> 
> 	host->regs = (struct sh_mmcif_regs *)CONFIG_SH_MMCIF_ADDR;
> -- 
> 1.9.1
> 

Acked-by: Pantelis Antoniou <panto at antoniou-consulting.com>



More information about the U-Boot mailing list