diff options
Diffstat (limited to 'sound/pci/asihpi/hpioctl.c')
-rw-r--r-- | sound/pci/asihpi/hpioctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c index 6aa677e60555..6610bd096fc9 100644 --- a/sound/pci/asihpi/hpioctl.c +++ b/sound/pci/asihpi/hpioctl.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
31 | #include <asm/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/pci.h> | 32 | #include <linux/pci.h> |
33 | #include <linux/stringify.h> | 33 | #include <linux/stringify.h> |
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
@@ -153,6 +153,8 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
153 | goto out; | 153 | goto out; |
154 | } | 154 | } |
155 | 155 | ||
156 | res_max_size = min_t(size_t, res_max_size, sizeof(*hr)); | ||
157 | |||
156 | switch (hm->h.function) { | 158 | switch (hm->h.function) { |
157 | case HPI_SUBSYS_CREATE_ADAPTER: | 159 | case HPI_SUBSYS_CREATE_ADAPTER: |
158 | case HPI_ADAPTER_DELETE: | 160 | case HPI_ADAPTER_DELETE: |
@@ -539,10 +541,8 @@ void asihpi_adapter_remove(struct pci_dev *pci_dev) | |||
539 | hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); | 541 | hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); |
540 | 542 | ||
541 | /* unmap PCI memory space, mapped during device init. */ | 543 | /* unmap PCI memory space, mapped during device init. */ |
542 | for (idx = 0; idx < HPI_MAX_ADAPTER_MEM_SPACES; idx++) { | 544 | for (idx = 0; idx < HPI_MAX_ADAPTER_MEM_SPACES; ++idx) |
543 | if (pci.ap_mem_base[idx]) | 545 | iounmap(pci.ap_mem_base[idx]); |
544 | iounmap(pci.ap_mem_base[idx]); | ||
545 | } | ||
546 | 546 | ||
547 | if (pa->irq) | 547 | if (pa->irq) |
548 | free_irq(pa->irq, pa); | 548 | free_irq(pa->irq, pa); |