Re: [PATCH] serial: atmel: fix error path of probe function

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

 



Le 23/09/2015 08:57, Uwe Kleine-König a écrit :
> If atmel_init_gpios fails the port has already been marked as busy (in
> line 2629), so this must be undone in the error path.
> 
> This bug was introduced because I created the patch that finally
> became 722ccf416ac2 ("serial: atmel: fix error handling when
> mctrl_gpio_init fails") on top of 3.19 which didn't have commit
> 6fbb9bdf0f3f ("tty/serial: at91: fix error handling in
> atmel_serial_probe()") yet.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> Fixes: 722ccf416ac2 ("serial: atmel: fix error handling when mctrl_gpio_init fails")

Acked-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxx>

Thanks Uwe for having noticed this.

Best regards,

> ---
>  drivers/tty/serial/atmel_serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 2a8f528153e7..40326b342762 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2641,7 +2641,7 @@ static int atmel_serial_probe(struct platform_device *pdev)
>  	ret = atmel_init_gpios(port, &pdev->dev);
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "Failed to initialize GPIOs.");
> -		goto err;
> +		goto err_clear_bit;
>  	}
>  
>  	ret = atmel_init_port(port, pdev);
> 


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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux