lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 15 Sep 2023 17:49:00 +0800
From:   Jacky Huang <ychuang570808@...il.com>
To:     Chen Ni <nichen@...as.ac.cn>, ychuang3@...oton.com,
        schung@...oton.com, gregkh@...uxfoundation.org,
        jirislaby@...nel.org, ilpo.jarvinen@...ux.intel.com
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-serial@...r.kernel.org
Subject: Re: [PATCH] tty: serial: ma35d1_serial: Add missing check for ioremap



On 2023/9/15 下午 03:11, Chen Ni wrote:
> CAUTION - External Email: Do not click links or open attachments unless you acknowledge the sender and content.
>
>
> Add check for ioremap() and return the error if it fails in order to
> guarantee the success of ioremap().
>
> Fixes: 930cbf92db01 ("tty: serial: Add Nuvoton ma35d1 serial driver support")
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>
> ---
>   drivers/tty/serial/ma35d1_serial.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/tty/serial/ma35d1_serial.c b/drivers/tty/serial/ma35d1_serial.c
> index 465b1def9e11..4a9d1252de35 100644
> --- a/drivers/tty/serial/ma35d1_serial.c
> +++ b/drivers/tty/serial/ma35d1_serial.c
> @@ -695,6 +695,9 @@ static int ma35d1serial_probe(struct platform_device *pdev)
>
>          up->port.iobase = res_mem->start;
>          up->port.membase = ioremap(up->port.iobase, MA35_UART_REG_SIZE);
> +       if (!up->port.membase)
> +               return -ENOMEM;
> +
>          up->port.ops = &ma35d1serial_ops;
>
>          spin_lock_init(&up->port.lock);
> --
> 2.25.1
>

Thank you for this update.

Acked-by: Jacky Huang <ychuang3@...oton.com>


Best Regards,
Jacky

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ