Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1568079

Re: [PATCH] Input: tegra-kbc - Fix possible NULL derefrence.

From Thierry Reding <thierry.reding@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Input: tegra-kbc - Fix possible NULL derefrence.
Date 2017-01-27 12:10 +0100
Message-ID <t4czN-3lb-35@gated-at.bofh.it> (permalink)
References <t4cgq-2YU-9@gated-at.bofh.it> <t4cgq-2YU-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, Jan 27, 2017 at 04:12:36PM +0530, Shailendra Verma wrote:
> of_match_device could return NULL, and so cause a NULL pointer
> dereference later.
> 
> Signed-off-by: Shailendra Verma <shailendra.v@samsung.com>
> ---
>  drivers/input/keyboard/tegra-kbc.c |    5 +++++
>  1 file changed, 5 insertions(+)

I think that's rather pointless. The driver is OF-only, so the only way
it will bind to a device is if the device's compatible matches one of
the entries in the tegra_kbc_of_match table, in which case match will
never be NULL.

Thierry

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] Input: tegra-kbc - Fix possible NULL derefrence. Shailendra Verma <shailendra.v@samsung.com> - 2017-01-27 11:50 +0100
  Re: [PATCH] Input: tegra-kbc - Fix possible NULL derefrence. Thierry Reding <thierry.reding@gmail.com> - 2017-01-27 12:10 +0100

csiph-web