From bba76322c3075776f222c4c7dd36f954ed458250 Mon Sep 17 00:00:00 2001 From: Shivani Bhardwaj Date: Thu, 15 Oct 2015 16:12:01 +0530 Subject: [PATCH] Staging: most: cdev: Remove useless check The variable mbo is already NULL tested so, check on it should be removed. Semantic patch used: @@ expression E; statement S; @@ if(E==NULL) {... return ...;} - if(E) S Signed-off-by: Shivani Bhardwaj Signed-off-by: Greg Kroah-Hartman --- drivers/staging/most/aim-cdev/cdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c index 16be88e..212a667 100644 --- a/drivers/staging/most/aim-cdev/cdev.c +++ b/drivers/staging/most/aim-cdev/cdev.c @@ -208,8 +208,7 @@ static ssize_t aim_write(struct file *filp, const char __user *buf, } return actual_len - retval; error: - if (mbo) - most_put_mbo(mbo); + most_put_mbo(mbo); return err; } -- 2.7.4