Re: spi: spi-fsl-dspi: new(ish) memory leak in dspi_setup_transfer()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2015-02-09 22:07, Brian Norris wrote:
> Hi,
> 
> FYI, Coverity reported a "new" memory leak since this commit:
> 
>     commit 973fbce69ed8e79b5fe3ad19cfecb581a7ef8048
>     Author: Bhuvanchandra DV <bhuvanchandra.dv@xxxxxxxxxxx>
>     Date:   Tue Jan 27 16:27:20 2015 +0530
> 
>         spi: spi-fsl-dspi: Remove usage of devm_kzalloc

Afaik, this has already been resolved by
https://lkml.org/lkml/2015/1/31/145

--
Stefan

> 
> On Mon, Feb 09, 2015 at 12:42:04PM -0800, scan-admin@xxxxxxxxxxxx wrote:
>> New defect(s) Reported-by: Coverity Scan
>> Showing 1 of 1 defect(s)
>>
>>
>> ** CID 1268408:  Resource leaks  (RESOURCE_LEAK)
>> /drivers/spi/spi-fsl-dspi.c: 356 in dspi_setup_transfer()
>>
>>
>> ________________________________________________________________________________________________________
>> *** CID 1268408:  Resource leaks  (RESOURCE_LEAK)
>> /drivers/spi/spi-fsl-dspi.c: 356 in dspi_setup_transfer()
>> 350     	chip->mcr_val = SPI_MCR_MASTER | SPI_MCR_PCSIS |
>> 351     		SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF;
>> 352     	if ((spi->bits_per_word >= 4) && (spi->bits_per_word <= 16)) {
>> 353     		fmsz = spi->bits_per_word - 1;
>> 354     	} else {
>> 355     		pr_err("Invalid wordsize\n");
>> >>>     CID 1268408:  Resource leaks  (RESOURCE_LEAK)
>> >>>     Variable "chip" going out of scope leaks the storage it points to.
>> 356     		return -ENODEV;
>> 357     	}
>> 358
>> 359     	chip->void_write_data = 0;
>> 360
>> 361     	hz_to_spi_baud(&pbr, &br,
>>
>>
>> ________________________________________________________________________________________________________
>> To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/128?tab=overview
> 
> It's not exactly new, but it's more obvious now.
> 
> (The report requires login, which can be done through GitHub, but all
> the relevant details are in the email above.)
> 
> Regards,
> Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux