[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d224c77f-048a-4fb4-b582-492fd428e270@web.de>
Date: Fri, 29 Dec 2023 09:56:22 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>, linux-input@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
Oliver Graute <oliver.graute@...oconnector.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
ye xingchen <ye.xingchen@....com.cn>, LKML <linux-kernel@...r.kernel.org>,
cocci@...ia.fr
Subject: Re: Input: usbtouchscreen - Return directly after a failed kmalloc()
in nexio_init()
>> The kfree() function was called in one case by
>> the nexio_init() function during error handling
>> even if the passed variable contained a null pointer.
>
> Which is perfectly valid thing to do, like free(), kfree() accepts NULL argument.
I find such a function call with this special parameter not so useful.
>> Thus return directly after a call of the function “kmalloc” failed
>> at the beginning.
>
> This is simply a matter of preference, the original author preferred
> that style, I see no objective reason to change it.
Would you ever like to avoid redundant data processing a bit more?
Regards,
Markus
Powered by blists - more mailing lists