Remove clientdata before kfree?

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

 



Hi Jean,

I am teaching myself coccinelle at the moment and created a semantic patch
which detects missing 'i2c_set_clientdata(client, NULL)' before freeing the
used data-structure. There are a number of drivers missing that.

While doing this, it is also trivial to change a few drivers to FIRST use
i2c_set_clientdata() and THEN kfree (those few are doing it the other way
around). I think it is cleaner this way, but probably doesn't matter much in
reality. So, should I do this transformation or rather drop it (which is also
trivial ;)).

Kind regards,

   Wolfram

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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux