From: Amit Gud Date: Fri, 18 Nov 2005 22:03:19 +0000 (+0100) Subject: [PATCH] cs5520: fix return value of cs5520_init_one() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1e39dead2bfa8023bcdee4f1e5e6c933aff24e20;p=openwrt%2Fstaging%2Fblogic.git [PATCH] cs5520: fix return value of cs5520_init_one() From: Amit Gud Patch follows from the suggestions by AC and Felipe W Damasio for fixing the return codes from IDE drivers. [ bart: fix coding style while at it ] Signed-off-by: Amit Gud Signed-off-by: Domen Puncer Signed-off-by: Alexey Dobriyan Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 7dc24682d197..ea3c52cc8ac1 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c @@ -222,10 +222,9 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic /* We must not grab the entire device, it has 'ISA' space in its BARS too and we will freak out other bits of the kernel */ - if(pci_enable_device_bars(dev, 1<<2)) - { + if (pci_enable_device_bars(dev, 1<<2)) { printk(KERN_WARNING "%s: Unable to enable 55x0.\n", d->name); - return 1; + return -ENODEV; } pci_set_master(dev); if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {