[PATCH] irda/sa1100_ir: check return value of startup hook

Sergei Shtylyov sshtylyov at ru.mvista.com
Fri Oct 9 08:14:52 EDT 2009


Hello.

Dmitry Artamonow wrote:

> Signed-off-by: Dmitry Artamonow <mad_soft at inbox.ru>
[...]
> diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
> index 38bf7cf..df5db2d 100644
> --- a/drivers/net/irda/sa1100_ir.c
> +++ b/drivers/net/irda/sa1100_ir.c
> @@ -232,8 +232,11 @@ static int sa1100_irda_startup(struct sa1100_irda *si)
>  	/*
>  	 * Ensure that the ports for this device are setup correctly.
>  	 */
> -	if (si->pdata->startup)
> -		si->pdata->startup(si->dev);
> +	if (si->pdata->startup)	{
> +		ret = si->pdata->startup(si->dev);
> +		if (ret)
> +			return ret;
> +		}

    Overindented brace.

>  
>  	/*
>  	 * Configure PPC for IRDA - we want to drive TXD2 low.

WBR, Sergei



More information about the linux-arm-kernel mailing list