Skip to contentSkip to conversation

Staging: most: cdev: Remove useless check

PATCH New Shivani Bhardwaj 1 participant 1 message Oct 15, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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

---
 drivers/staging/most/aim-cdev/cdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/most/aim-cdev/cdev.c +1 -2
index 930ada0..5dc5608 100644
@@ -207,8 +207,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;
 }
 
Signature · 1 line
2.1.0