oradax: remove redundant null check before kfree
authorColin Ian King <colin.king@canonical.com>
Fri, 7 Sep 2018 10:35:00 +0000 (11:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Oct 2018 05:42:00 +0000 (22:42 -0700)
A null check before a kfree is redundant, so remove it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/sbus/char/oradax.c

index 524f9ea..6516bc3 100644 (file)
@@ -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;
 }