staging: bcm2835: Don't probe if no camera is detected
authorStefan Wahren <stefan.wahren@i2se.com>
Mon, 22 Oct 2018 09:09:18 +0000 (11:09 +0200)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:11 +0000 (00:08 +0100)
commit8f1103e1e713f0a6aea2cbf85c51eb9ecc04c913
tree89a25a0d68dad0f1468e785aee3c9b38c85de33d
parentb7f9131a3e42c12e673d1e9d97a47061f1a74754
staging: bcm2835: Don't probe if no camera is detected

It is a waste of resources to load 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>
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c