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

- From: Thierry Reding \<hidden\>
- Date: 2017-01-27 11:05:30 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2017/01/4921609
- Thread: https://ratatoskr.run/linux-input/2017/01/4921559/t.md

```text
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 <redacted>
> ---
>  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
```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-input/2017/01/4921609/attachment/0) (application/pgp-signature, 833 bytes)
