summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/bt8xx/dvb-bt8xx.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-06 14:05:41 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 22:53:37 +0200
commit16d6c0b02c555b93034ffef4bf1b2d8ae80d8102 (patch)
treefd7f4b50e8785df4be581d2d6a80c3516b80c5c3 /drivers/media/dvb/bt8xx/dvb-bt8xx.c
parent[media] DocBook/demux.xml: Remove generic errors (diff)
downloadlinux-16d6c0b02c555b93034ffef4bf1b2d8ae80d8102.tar.xz
linux-16d6c0b02c555b93034ffef4bf1b2d8ae80d8102.zip
[media] dvb-bt8xx: Don't return -EFAULT when a device is not found
When a device (or their PCI structs) are not found, the error should be -ENODEV. -EFAULT is reserved for errors while copying arguments from/to userspace. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/bt8xx/dvb-bt8xx.c')
-rw-r--r--drivers/media/dvb/bt8xx/dvb-bt8xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index 1e1106dcd063..521d69104982 100644
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -892,7 +892,7 @@ static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub)
if (!(bttv_pci_dev = bttv_get_pcidev(card->bttv_nr))) {
printk("dvb_bt8xx: no pci device for card %d\n", card->bttv_nr);
kfree(card);
- return -EFAULT;
+ return -ENODEV;
}
if (!(card->bt = dvb_bt8xx_878_match(card->bttv_nr, bttv_pci_dev))) {
@@ -902,7 +902,7 @@ static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub)
"installed, try removing it.\n");
kfree(card);
- return -EFAULT;
+ return -ENODEV;
}
mutex_init(&card->bt->gpio_lock);