Commit 45432d41 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

[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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8cd05842
...@@ -405,6 +405,9 @@ static void sd_stop0(struct gspca_dev *gspca_dev) ...@@ -405,6 +405,9 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
{ {
struct sd *sd = (struct sd *) gspca_dev; struct sd *sd = (struct sd *) gspca_dev;
if (!sd->gspca_dev.present)
return;
return sd->dev_post_unset_alt(gspca_dev); return sd->dev_post_unset_alt(gspca_dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment