diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2010-11-15 13:32:43 -0500 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-11-15 13:32:43 -0500 |
commit | 3e9bb2a071614f1d185740f31ac503ecba11d783 (patch) | |
tree | 26266b33e40c522c734227946b03bf5557898f62 /drivers/block/ataflop.c | |
parent | c2f6805d470af369a7337801deeecea800dbfe1c (diff) |
block: fix amiga and atari floppy driver compile warning
Geert, my crosstool don't produce warning below. I guess this has to do
something with compiler version.
- Geert noticed following warning during compilation.
drivers/block/amiflop.c:1344: warning: ‘rq’ may be used uninitialized in
this function
drivers/block/ataflop.c:1402: warning: ‘rq’ may be used uninitialized in
this function
- Initialize rq to NULL to fix the warning. If we can't find a suitable request
to dispatch, this function should return NULL instead of a possibly garbage
pointer.
- Cross compile tested only. Don't have hardware to test it.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/ataflop.c')
-rw-r--r-- | drivers/block/ataflop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 4e4cc6c828cb..605a67e40bbf 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
@@ -1399,7 +1399,7 @@ static struct request *set_next_request(void) | |||
1399 | { | 1399 | { |
1400 | struct request_queue *q; | 1400 | struct request_queue *q; |
1401 | int old_pos = fdc_queue; | 1401 | int old_pos = fdc_queue; |
1402 | struct request *rq; | 1402 | struct request *rq = NULL; |
1403 | 1403 | ||
1404 | do { | 1404 | do { |
1405 | q = unit[fdc_queue].disk->queue; | 1405 | q = unit[fdc_queue].disk->queue; |