From: Colin Ian King Date: Fri, 7 Sep 2018 10:35:00 +0000 (+0100) Subject: oradax: remove redundant null check before kfree X-Git-Tag: v4.19-rc8~40^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16e2a9d396c140d9a47d6b22e2a631f36c31e844;p=thirdparty%2Fkernel%2Flinux.git oradax: remove redundant null check before kfree A null check before a kfree is redundant, so remove it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller --- diff --git a/drivers/sbus/char/oradax.c b/drivers/sbus/char/oradax.c index 524f9ea62e52a..6516bc3cb58b0 100644 --- a/drivers/sbus/char/oradax.c +++ b/drivers/sbus/char/oradax.c @@ -689,8 +689,7 @@ static int dax_open(struct inode *inode, struct file *f) alloc_error: kfree(ctx->ccb_buf); done: - if (ctx != NULL) - kfree(ctx); + kfree(ctx); return -ENOMEM; }