* [PATCH] block: blk-exec.c: Cleaning up local variable address returnd
@ 2014-06-06 22:37 Rickard Strandqvist
2014-06-09 1:50 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2014-06-06 22:37 UTC (permalink / raw)
To: Jens Axboe, linux-kernel; +Cc: Rickard Strandqvist
Address of local variable assigned to a function parameter
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
block/blk-exec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/block/blk-exec.c b/block/blk-exec.c
index dbf4502..f4d27b1 100644
--- a/block/blk-exec.c
+++ b/block/blk-exec.c
@@ -132,6 +132,11 @@ int blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk,
if (rq->errors)
err = -EIO;
+ if (rq->sense == sense) {
+ rq->sense = NULL;
+ rq->sense_len = 0;
+ }
+
return err;
}
EXPORT_SYMBOL(blk_execute_rq);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-09 1:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-06 22:37 [PATCH] block: blk-exec.c: Cleaning up local variable address returnd Rickard Strandqvist
2014-06-09 1:50 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox