Staging: most: cdev: Remove useless check
authorShivani Bhardwaj <shivanib134@gmail.com>
Thu, 15 Oct 2015 10:42:01 +0000 (16:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 06:08:39 +0000 (23:08 -0700)
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 <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/aim-cdev/cdev.c

index 16be88e..212a667 100644 (file)
@@ -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;
 }