]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: most: core: check value returned by match function
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 21 Nov 2017 14:05:17 +0000 (15:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Nov 2017 08:20:37 +0000 (09:20 +0100)
commit3ba5515bf4eecbec08fedde5e35bdabb153c83be
tree972a415f09c6e0fc40234deab94b897765b07ee5
parent4e6d561d51f91ad465e127b6b5fabf1f1db01fc5
staging: most: core: check value returned by match function

This patch adds a check for the pointer returned by the function
match_component. It is needed to prevent a NULL pointer dereference in
case the provided component name does not match any list entry.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/core.c