Staging: most: cdev: Remove unnecessary check
Subsystems (2)
PATCH 1/1 Staging: most: cdev: Remove unnecessary check
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
--- drivers/staging/most/aim-cdev/cdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/most/aim-cdev/cdev.c +1 -2
@@ -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
Quoted 11 lines · Shivani Bhardwaj
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
I don't think that this semantic patch actually matches the code below.
julia
Quoted 30 lines
Signed-off-by Shivani Bhardwaj <[email protected]>--- drivers/staging/most/aim-cdev/cdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/most/aim-cdev/cdev.c +1
-3@@ -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
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151015102240.GA17961%40ubuntu.
For more options, visit https://groups.google.com/d/optout.
Quoted 14 lines · Julia Lawall
Quoted 11 lines · Shivani Bhardwaj
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
Quoted 4 lines
I don't think that this semantic patch actually matches the code below.
julia
I'm sorry. I've sent another version. I've tested that on a dummy file. Thank you.
Quoted 30 lines
Quoted 30 lines
Signed-off-by Shivani Bhardwaj <[email protected]>--- drivers/staging/most/aim-cdev/cdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/most/aim-cdev/cdev.c +1
-3@@ -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
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151015102240.GA17961%40ubuntu.
For more options, visit https://groups.google.com/d/optout.