diff options
author | Julia Lawall <julia@diku.dk> | 2010-02-02 23:40:30 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-02-09 03:49:55 +0100 |
commit | 7dad9ef6d9255b4d2d0a26305a785a55f3ba55e3 (patch) | |
tree | 33f83c024e834dc26f47db4cbea0224342244f26 /drivers/gpu/drm/nouveau/nouveau_fbcon.h | |
parent | drm/nouveau: call ttm_bo_wait with the bo lock held to prevent hang (diff) | |
download | linux-7dad9ef6d9255b4d2d0a26305a785a55f3ba55e3.tar.xz linux-7dad9ef6d9255b4d2d0a26305a785a55f3ba55e3.zip |
drivers/gpu/drm/nouveau/nouveau_grctx.c: correct NULL test
Test the just-allocated value for NULL rather than some other value.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression x,y;
statement S;
@@
x = \(kmalloc\|kcalloc\|kzalloc\)(...);
(
if ((x) == NULL) S
|
if (
- y
+ x
== NULL)
S
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: David Airlie <airlied@linux.ie>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fbcon.h')
0 files changed, 0 insertions, 0 deletions