diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-05-07 13:53:27 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 16:33:25 +0400 |
commit | 45432d41a2eebf5daaacb81de37fbfffc0a8faa7 (patch) | |
tree | ff91ee867101be41f6ecdcf67a897d0194e2b51b /drivers/media/video/gspca/gl860 | |
parent | 8cd058423f22072c1147d3e99161252e1e72333a (diff) | |
download | linux-45432d41a2eebf5daaacb81de37fbfffc0a8faa7.tar.xz |
[media] gspca_gl860: Add a present check to sd_stop0
The sensor specific dev_post_unset_alt functions all try to write to the
bridge, and none free any memory, so they should be skipped if stop0
is called on disconnection.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gl860')
-rw-r--r-- | drivers/media/video/gspca/gl860/gl860.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/gl860/gl860.c b/drivers/media/video/gspca/gl860/gl860.c index c84e26006fc3..c549574c1c7e 100644 --- a/drivers/media/video/gspca/gl860/gl860.c +++ b/drivers/media/video/gspca/gl860/gl860.c @@ -405,6 +405,9 @@ static void sd_stop0(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; + if (!sd->gspca_dev.present) + return; + return sd->dev_post_unset_alt(gspca_dev); } |