Re: drivers/mmc/card/queue.c: 5 * redundant conditions

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

 



> > Checking ./drivers/mmc/card/queue.c...
> > [./drivers/mmc/card/queue.c:212]: (style) Redundant condition. It is safe to deallocate a NULL pointer
> > [./drivers/mmc/card/queue.c:215]: (style) Redundant condition. It is safe to deallocate a NULL pointer
> > [./drivers/mmc/card/queue.c:208]: (style) Redundant condition. It is safe to deallocate a NULL pointer
> > [./drivers/mmc/card/queue.c:239]: (style) Redundant condition. It is safe to deallocate a NULL pointer
> > [./drivers/mmc/card/queue.c:246]: (style) Redundant condition. It is safe to deallocate a NULL pointer
> 
> This report appears to be using a kernel config with CONFIG_MMC_BLOCK_BOUNCE=y.
> What does cppcheck report for the CONFIG_MMC_BLOCK_BOUNCE=n case?  I believe
> you will find that it is not sage to remove those conditions for the
> CONFIG_MMC_BLOCK_BOUNCE=n case.
> 

How is that? kfree(NULL) is legal.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux