Skip to content

Commit

Permalink
oradax: remove redundant null check before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Oct 8, 2018
1 parent 31a43fa commit 16e2a9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/sbus/char/oradax.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 16e2a9d

Please sign in to comment.