All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Staging: most: cdev: Remove useless check
@ 2015-10-15 10:42 Shivani Bhardwaj
  0 siblings, 0 replies; only message in thread
From: Shivani Bhardwaj @ 2015-10-15 10:42 UTC (permalink / raw)
  To: outreachy-kernel

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>
---
 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 930ada0..5dc5608 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -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;
 }
 
-- 
2.1.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-15 10:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 10:42 [PATCH v2] Staging: most: cdev: Remove useless check Shivani Bhardwaj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.