diff options
Diffstat (limited to 'drivers/staging/rts5208')
-rw-r--r-- | drivers/staging/rts5208/Makefile | 2 | ||||
-rw-r--r-- | drivers/staging/rts5208/rtsx.c | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/rts5208/Makefile b/drivers/staging/rts5208/Makefile index 6a934c41c738..3c9e9797d3d9 100644 --- a/drivers/staging/rts5208/Makefile +++ b/drivers/staging/rts5208/Makefile @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_RTS5208) := rts5208.o -ccflags-y := -Idrivers/scsi - rts5208-y := rtsx.o rtsx_chip.o rtsx_transport.o rtsx_scsi.o \ rtsx_card.o general.o sd.o xd.o ms.o spi.o diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index cb95ad6fa4f9..be0053c795b7 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -831,7 +831,8 @@ static int rtsx_probe(struct pci_dev *pci, host = scsi_host_alloc(&rtsx_host_template, sizeof(*dev)); if (!host) { dev_err(&pci->dev, "Unable to allocate the scsi host\n"); - return -ENOMEM; + err = -ENOMEM; + goto scsi_host_alloc_fail; } dev = host_to_rtsx(host); @@ -858,7 +859,7 @@ static int rtsx_probe(struct pci_dev *pci, dev_info(&pci->dev, "Resource length: 0x%x\n", (unsigned int)pci_resource_len(pci, 0)); dev->addr = pci_resource_start(pci, 0); - dev->remap_addr = ioremap_nocache(dev->addr, pci_resource_len(pci, 0)); + dev->remap_addr = ioremap(dev->addr, pci_resource_len(pci, 0)); if (!dev->remap_addr) { dev_err(&pci->dev, "ioremap error\n"); err = -ENXIO; @@ -971,7 +972,8 @@ ioremap_fail: kfree(dev->chip); chip_alloc_fail: dev_err(&pci->dev, "%s failed\n", __func__); - +scsi_host_alloc_fail: + pci_release_regions(pci); return err; } @@ -983,6 +985,7 @@ static void rtsx_remove(struct pci_dev *pci) quiesce_and_remove_host(dev); release_everything(dev); + pci_release_regions(pci); } /* PCI IDs */ |