[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220330183448.GB18042@alpha.franken.de>
Date: Wed, 30 Mar 2022 20:34:48 +0200
From: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To: xkernel.wang@...mail.com
Cc: john@...ozen.org, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] MIPS: lantiq: check the return value of kzalloc()
On Fri, Mar 25, 2022 at 07:49:41PM +0800, xkernel.wang@...mail.com wrote:
> From: Xiaoke Wang <xkernel.wang@...mail.com>
>
> kzalloc() is a memory allocation function which can return NULL when
> some internal memory errors happen. So it is better to check the
> return value of it to prevent potential wrong memory access or
> memory leak.
>
> Signed-off-by: Xiaoke Wang <xkernel.wang@...mail.com>
> ---
> arch/mips/lantiq/falcon/sysctrl.c | 2 ++
> arch/mips/lantiq/xway/gptu.c | 2 ++
> arch/mips/lantiq/xway/sysctrl.c | 46 ++++++++++++++++++++-----------
> 3 files changed, 34 insertions(+), 16 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
Powered by blists - more mailing lists