diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 01:01:29 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 07:54:02 -0800 |
commit | 735d5661d5c5f023a78fbe68e771e261040ff1b7 (patch) | |
tree | b9865f0322d8e74661639f5f33b1897b23004659 /drivers/char/drm/ffb_context.c | |
parent | fa671646f61182cd18234461a6e65f50c6558695 (diff) | |
download | talos-obmc-linux-735d5661d5c5f023a78fbe68e771e261040ff1b7.tar.gz talos-obmc-linux-735d5661d5c5f023a78fbe68e771e261040ff1b7.zip |
[PATCH] kfree cleanup: drivers/char
This is the drivers/char/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/char/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/drm/ffb_context.c')
-rw-r--r-- | drivers/char/drm/ffb_context.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/drm/ffb_context.c b/drivers/char/drm/ffb_context.c index 8a6cc2751bc9..1383727b443a 100644 --- a/drivers/char/drm/ffb_context.c +++ b/drivers/char/drm/ffb_context.c @@ -526,10 +526,8 @@ int ffb_driver_rmctx(struct inode *inode, struct file *filp, unsigned int cmd, if (idx < 0 || idx >= FFB_MAX_CTXS) return -EINVAL; - if (fpriv->hw_state[idx] != NULL) { - kfree(fpriv->hw_state[idx]); - fpriv->hw_state[idx] = NULL; - } + kfree(fpriv->hw_state[idx]); + fpriv->hw_state[idx] = NULL; return 0; } |