summaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-09-07 11:35:00 +0100
committerDavid S. Miller <davem@davemloft.net>2018-10-07 22:42:00 -0700
commit16e2a9d396c140d9a47d6b22e2a631f36c31e844 (patch)
tree986a3521976351782ddc6694abaae0d4ed8bc761 /drivers/sbus
parent31a43fa7945a1de8c550b35c211be5670e32f12b (diff)
downloadlinux-16e2a9d396c140d9a47d6b22e2a631f36c31e844.tar.gz
linux-16e2a9d396c140d9a47d6b22e2a631f36c31e844.tar.bz2
linux-16e2a9d396c140d9a47d6b22e2a631f36c31e844.zip
oradax: remove redundant null check before kfree
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>
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/oradax.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/sbus/char/oradax.c b/drivers/sbus/char/oradax.c
index 524f9ea62e52..6516bc3cb58b 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;
}