IEEE 1394 subsystem patch:

- catch an initialization error in the packet sniffer nosy
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJYBScGAAoJEHnzb7JUXXnQiPsP/2NdZuTI2Ot+eATNJsKoIqlQ
 v95edanCzJim250Qvgy8dtYjizB7XuPoilx/soc9gReomJA7TyGEAxN4CgWBloAf
 6W1C0rAlvCGkGGGVrjv9TfCpTkXEkoLHuiW/V1crkEpx1p3qomafN8zqZH4kz6hA
 pSJHjea0/U8YuhHlORELyIN2BgWXxhVPr7U6c87l7bC91DLoZXdzJ2nFjRpFIped
 HjjjL/rVMtqx7EGkZ0D+qZYz0OJX9aMO1t/zCXU/1CT4UnaNPPQmCRsDfyEA3YZh
 PSnQpT6z2/kIttXQkmvnAFSTtaaFQoou/Jva4mRph5EzC9O9T/uMFF+0yUoqXeN1
 u2qyMrO6e4gqrlFaaaTvh5v2KsjWtpPw7Tv38rT3IwOia37TpHdm+E6NGmxDKcSc
 3EmaAvyfPUdpI9q4FJWDOIyyBaNSZpVBsQH1+XlaiI137jiQNBYIg9gzy50zaQPf
 WYTZ8ocjDLGF9mN6mibdLE3vdmi6n1mgNUzhDDa8KLQfiLjC30AshuRT8IVUD496
 g5HcuJfR2IXj6leET+Wxp80rfSnYPDEPGYtjLzxF0k5w5DZj/znaMTaTtTxfeMC0
 SgB9nvejRoQxME6cj+5uZB85X1w6pDjoOwqvf0VWPtv4jG4ZmfuRCZ54JpROEZeA
 SMtqX/NvjkcHW5OkbfU2
 =YbZK
 -----END PGP SIGNATURE-----

Merge tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394

Pull firewire fixlet from Stefan Richter:
 "IEEE 1394 subsystem patch: catch an initialization error in the packet
  sniffer nosy"

* tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: nosy: do not ignore errors in ioremap_nocache()
This commit is contained in:
Linus Torvalds 2016-10-18 08:28:08 -07:00
commit 5aa43efe90

View File

@ -566,6 +566,11 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
lynx->registers = ioremap_nocache(pci_resource_start(dev, 0),
PCILYNX_MAX_REGISTER);
if (lynx->registers == NULL) {
dev_err(&dev->dev, "Failed to map registers\n");
ret = -ENOMEM;
goto fail_deallocate_lynx;
}
lynx->rcv_start_pcl = pci_alloc_consistent(lynx->pci_device,
sizeof(struct pcl), &lynx->rcv_start_pcl_bus);
@ -578,7 +583,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
lynx->rcv_buffer == NULL) {
dev_err(&dev->dev, "Failed to allocate receive buffer\n");
ret = -ENOMEM;
goto fail_deallocate;
goto fail_deallocate_buffers;
}
lynx->rcv_start_pcl->next = cpu_to_le32(lynx->rcv_pcl_bus);
lynx->rcv_pcl->next = cpu_to_le32(PCL_NEXT_INVALID);
@ -641,7 +646,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
dev_err(&dev->dev,
"Failed to allocate shared interrupt %d\n", dev->irq);
ret = -EIO;
goto fail_deallocate;
goto fail_deallocate_buffers;
}
lynx->misc.parent = &dev->dev;
@ -668,7 +673,7 @@ fail_free_irq:
reg_write(lynx, PCI_INT_ENABLE, 0);
free_irq(lynx->pci_device->irq, lynx);
fail_deallocate:
fail_deallocate_buffers:
if (lynx->rcv_start_pcl)
pci_free_consistent(lynx->pci_device, sizeof(struct pcl),
lynx->rcv_start_pcl, lynx->rcv_start_pcl_bus);
@ -679,6 +684,8 @@ fail_deallocate:
pci_free_consistent(lynx->pci_device, PAGE_SIZE,
lynx->rcv_buffer, lynx->rcv_buffer_bus);
iounmap(lynx->registers);
fail_deallocate_lynx:
kfree(lynx);
fail_disable: