Commit 16d6c0b0 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c1798c90
...@@ -892,7 +892,7 @@ static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub) ...@@ -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))) { if (!(bttv_pci_dev = bttv_get_pcidev(card->bttv_nr))) {
printk("dvb_bt8xx: no pci device for card %d\n", card->bttv_nr); printk("dvb_bt8xx: no pci device for card %d\n", card->bttv_nr);
kfree(card); kfree(card);
return -EFAULT; return -ENODEV;
} }
if (!(card->bt = dvb_bt8xx_878_match(card->bttv_nr, bttv_pci_dev))) { 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) ...@@ -902,7 +902,7 @@ static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub)
"installed, try removing it.\n"); "installed, try removing it.\n");
kfree(card); kfree(card);
return -EFAULT; return -ENODEV;
} }
mutex_init(&card->bt->gpio_lock); mutex_init(&card->bt->gpio_lock);
......
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