Re: [PATCH v5.10] scsi: pm80xx: Fix memory leak during rmmod

From: Markus Elfring
Date: Mon Aug 11 2025 - 04:01:57 EST



> +++ b/drivers/scsi/pm8001/pm8001_init.c

> @@ -1226,6 +1227,16 @@ static void pm8001_pci_remove(struct pci_dev *pdev)
> tasklet_kill(&pm8001_ha->tasklet[j]);
> #endif
> scsi_host_put(pm8001_ha->shost);
> +
> + for (i = 0; i < pm8001_ha->ccb_count; i++) {
> + dma_free_coherent(&pm8001_ha->pdev->dev,
> + sizeof(struct pm8001_prd) * PM8001_MAX_DMA_SG,
> + pm8001_ha->ccb_info[i].buf_prd,
> + pm8001_ha->ccb_info[i].ccb_dma_handle);
> + }

May curly brackets be omitted here?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.16#n197

Regards,
Markus