summaryrefslogtreecommitdiffstats
path: root/drivers/block/amiflop.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2010-11-15 19:32:43 +0100
committerJens Axboe <jaxboe@fusionio.com>2010-11-15 19:32:43 +0100
commit3e9bb2a071614f1d185740f31ac503ecba11d783 (patch)
tree26266b33e40c522c734227946b03bf5557898f62 /drivers/block/amiflop.c
parentc2f6805d470af369a7337801deeecea800dbfe1c (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/amiflop.c')
-rw-r--r--drivers/block/amiflop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index a1725e6488d..7888501ad9e 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1341,7 +1341,7 @@ static struct request *set_next_request(void)
{
struct request_queue *q;
int cnt = FD_MAX_UNITS;
- struct request *rq;
+ struct request *rq = NULL;
/* Find next queue we can dispatch from */
fdc_queue = fdc_queue + 1;