Skip to content

Commit

Permalink
[media] gspca_gl860: Add a present check to sd_stop0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent 8cd0584 commit 45432d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/gspca/gl860/gl860.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 45432d4

Please sign in to comment.