[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADBw62pMx_S8nhYixUqq=A6Mg_5fX+2Mh6HZV6mX-uNQw2+D5A@mail.gmail.com>
Date: Wed, 18 Mar 2020 18:55:04 +0800
From: Baolin Wang <baolin.wang7@...il.com>
To: Chunyan Zhang <zhang.lyra@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Orson Zhai <orsonzhai@...il.com>,
Chunyan Zhang <chunyan.zhang@...soc.com>
Subject: Re: [PATCH v3 2/2] serial: sprd: remove redundant sprd_port cleanup
On Wed, Mar 18, 2020 at 6:51 PM Chunyan Zhang <zhang.lyra@...il.com> wrote:
>
> From: Chunyan Zhang <chunyan.zhang@...soc.com>
>
> We don't need to cleanup sprd_port anymore, since we've dropped the way
> of using the sprd_port[] array to get port index.
>
> Signed-off-by: Chunyan Zhang <chunyan.zhang@...soc.com>
Looks good to me.
Reviewed-by: Baolin Wang <baolin.wang7@...il.com>
> ---
> drivers/tty/serial/sprd_serial.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
> index e9d148d47bec..cefdd051b2d0 100644
> --- a/drivers/tty/serial/sprd_serial.c
> +++ b/drivers/tty/serial/sprd_serial.c
> @@ -1237,10 +1237,8 @@ static int sprd_probe(struct platform_device *pdev)
> sprd_ports_num++;
>
> ret = uart_add_one_port(&sprd_uart_driver, up);
> - if (ret) {
> - sprd_port[index] = NULL;
> + if (ret)
> sprd_remove(pdev);
> - }
>
> platform_set_drvdata(pdev, up);
>
> --
> 2.20.1
>
--
Baolin Wang
Powered by blists - more mailing lists