staging: bcm2835-camera: Abort probe if there is no camera
authorStefan Wahren <stefan.wahren@i2se.com>
Thu, 6 Dec 2018 18:28:51 +0000 (19:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Dec 2018 10:56:46 +0000 (11:56 +0100)
commit7566f39dfdc11f8a97d5810c6e6295a88f97ef91
tree9912af9ae05ff0ebdbfcaa5f12f8a485bed0a61f
parent99c22707ef647f692b6beb274fed2b6893955a3a
staging: bcm2835-camera: Abort probe if there is no camera

Abort the probing of the camera driver in case there isn't a camera
actually connected to the Raspberry Pi. This solution also avoids a
NULL ptr dereference of mmal instance on driver unload.

Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c