diff options
author | Julien Brunel <brunel@diku.dk> | 2008-08-29 11:08:32 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-09-30 10:12:56 +0200 |
commit | a70948b564e9f6cb81115c606d46f5b74a77b7c2 (patch) | |
tree | e1a75ccf9580746d22409430b346436fd148dab7 /fs/ubifs/key.h | |
parent | UBIFS: inline one-line functions (diff) | |
download | linux-a70948b564e9f6cb81115c606d46f5b74a77b7c2.tar.xz linux-a70948b564e9f6cb81115c606d46f5b74a77b7c2.zip |
UBIFS: use an IS_ERR test rather than a NULL test
In case of error, the function kthread_create returns an ERR pointer,
but never returns a NULL pointer. So a NULL test that comes before an
IS_ERR test should be deleted.
The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@match_bad_null_test@
expression x, E;
statement S1,S2;
@@
x = kthread_create(...)
... when != x = E
* if (x == NULL)
S1 else S2
// </smpl>
Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/key.h')
0 files changed, 0 insertions, 0 deletions