From: Shivani Bhardwaj Date: Thu, 15 Oct 2015 10:42:01 +0000 (+0530) Subject: Staging: most: cdev: Remove useless check X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=bba76322c3075776f222c4c7dd36f954ed458250;p=deliverable%2Flinux.git 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 --- diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c index 16be88e2b454..212a667820df 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; }