]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
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 524f9ea62e52a0ed472b1177c57f7aa3b0f98f17..6516bc3cb58b0704b37a57d1cff3d3297feccb71 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;
 }