firewire: nosy: Fix dma_free_coherent() size

It looks like the buffer allocated and mapped in add_card() is done
with size RCV_BUFFER_SIZE which is 16 KB and 4KB.

Fixes: 286468210d83 ("firewire: new driver: nosy - IEEE 1394 traffic sniffer")
Co-developed-by: Thomas Fourier <fourier.thomas@gmail.com>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Co-developed-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20251216165420.38355-2-fourier.thomas@gmail.com
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

authored by Thomas Fourier and committed by Takashi Sakamoto c48c0fd0 9448598b

Changed files
+5 -5
drivers
firewire
+5 -5
drivers/firewire/nosy.c
··· 36 36 37 37 static char driver_name[] = KBUILD_MODNAME; 38 38 39 + #define RCV_BUFFER_SIZE (16 * 1024) 40 + 39 41 /* this is the physical layout of a PCL, its size is 128 bytes */ 40 42 struct pcl { 41 43 __le32 next; ··· 519 517 lynx->rcv_start_pcl, lynx->rcv_start_pcl_bus); 520 518 dma_free_coherent(&lynx->pci_device->dev, sizeof(struct pcl), 521 519 lynx->rcv_pcl, lynx->rcv_pcl_bus); 522 - dma_free_coherent(&lynx->pci_device->dev, PAGE_SIZE, lynx->rcv_buffer, 523 - lynx->rcv_buffer_bus); 520 + dma_free_coherent(&lynx->pci_device->dev, RCV_BUFFER_SIZE, 521 + lynx->rcv_buffer, lynx->rcv_buffer_bus); 524 522 525 523 iounmap(lynx->registers); 526 524 pci_disable_device(dev); 527 525 lynx_put(lynx); 528 526 } 529 - 530 - #define RCV_BUFFER_SIZE (16 * 1024) 531 527 532 528 static int 533 529 add_card(struct pci_dev *dev, const struct pci_device_id *unused) ··· 680 680 dma_free_coherent(&lynx->pci_device->dev, sizeof(struct pcl), 681 681 lynx->rcv_pcl, lynx->rcv_pcl_bus); 682 682 if (lynx->rcv_buffer) 683 - dma_free_coherent(&lynx->pci_device->dev, PAGE_SIZE, 683 + dma_free_coherent(&lynx->pci_device->dev, RCV_BUFFER_SIZE, 684 684 lynx->rcv_buffer, lynx->rcv_buffer_bus); 685 685 iounmap(lynx->registers); 686 686