All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: most: cdev: Remove unnecessary check
@ 2015-10-15 10:22 Shivani Bhardwaj
  2015-10-15 10:33 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Shivani Bhardwaj @ 2015-10-15 10:22 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 S1, S2, S3; @@
if(E==NULL) {... return ...;}
else S1
- if(E==NULL)
  S2
- else S3

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] 3+ messages in thread

end of thread, other threads:[~2015-10-15 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 10:22 [PATCH] Staging: most: cdev: Remove unnecessary check Shivani Bhardwaj
2015-10-15 10:33 ` [Outreachy kernel] " Julia Lawall
2015-10-15 10:43   ` 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.