mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Staging: ipack/bridges/tpci200: check if the remove function is available
To avoid a dereference of a NULL pointer, the availability of the function is checked before its use. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6ad0c486a4
commit
786d986ea2
1 changed files with 2 additions and 0 deletions
|
|
@ -764,6 +764,8 @@ out:
|
|||
static void tpci200_slot_remove(struct tpci200_slot *slot)
|
||||
{
|
||||
if ((slot->dev == NULL) ||
|
||||
(slot->dev->driver == NULL) ||
|
||||
(slot->dev->driver->ops == NULL) ||
|
||||
(slot->dev->driver->ops->remove == NULL))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue