[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c27f53e8-5155-47f6-afb7-15b53cd5aa4d@web.de>
Date: Mon, 18 Nov 2024 13:00:09 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Charles Han <hanchunchao@...pur.com>, Chanwoo Choi
<cw00.choi@...sung.com>, MyungJoo Ham <myungjoo.ham@...sung.com>,
Stanley Chang <stanley_chang@...ltek.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] extcon: realtek: fix NULL deref check in
extcon_rtk_type_c_probe
> In extcon_rtk_type_c_probe() devm_kzalloc() may return NULL but this
> returned value is not checked.
Another wording suggestion:
A devm_kzalloc() call can return a null pointer on failure.
But such a return value was not checked in this function implementation.
Thus add a corresponding check so that a null pointer dereference
will be avoided.
Would a summary phrase like “Prevent null pointer dereference in extcon_rtk_type_c_probe()”
be a bit nicer?
Regards,
Markus
Powered by blists - more mailing lists