Skip to content

Commit

Permalink
[media] saa7164: bugfix, avoid oops when driver unloads without firmware
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent a1c592b commit 22760ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/video/saa7164/saa7164-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,8 @@ static void __devexit saa7164_finidev(struct pci_dev *pci_dev)
kthread_stop(dev->kthread);
dev->kthread = NULL;
}
saa7164_api_set_debug(dev, 0x00);
if (dev->firmwareloaded)
saa7164_api_set_debug(dev, 0x00);
}

saa7164_histogram_print(&dev->ports[ SAA7164_PORT_ENC1 ],
Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/saa7164/saa7164-fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev)
}
}

dev->firmwareloaded = 1;
ret = 0;

out:
Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/saa7164/saa7164.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ struct saa7164_dev {

/* firmware status */
struct saa7164_fw_status fw_status;
u32 firmwareloaded;

tmComResHWDescr_t hwdesc;
tmComResInterfaceDescr_t intfdesc;
Expand Down

0 comments on commit 22760ed

Please sign in to comment.