Tag: faa7b7ddca14887ac037f585d2fac7ca6c57037e

drivers/cpuidle: Move dereference after NULL test

Author: Julia Lawall <julia@diku.dk> It does not seem possible that ldev can be NULL, so drop the unnecessary test. If ldev can somehow be NULL, then the initialization of last_idx should be moved below the test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // @match exists@ expression …

Continue reading