]> err.no Git - linux-2.6/commitdiff
memstick: drivers/memstick/host/jmb38x_ms.c: suppress uninitialized var warning
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 20 Mar 2008 00:01:04 +0000 (17:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Mar 2008 01:53:37 +0000 (18:53 -0700)
drivers/memstick/host/jmb38x_ms.c: In function 'jmb38x_ms_transfer_data':
drivers/memstick/host/jmb38x_ms.c:294: warning: 'p_off' may be used uninitialized in this function

Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/memstick/host/jmb38x_ms.c

index fcfa24b7b1db31a0dfcf2f20a88baf280d786630..9a57504183c77bca30636cf6204f5eefb4169022 100644 (file)
@@ -274,7 +274,7 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
 {
        unsigned int length;
        unsigned int off;
-       unsigned int t_size, p_off, p_cnt;
+       unsigned int t_size, p_cnt;
        unsigned char *buf;
        struct page *pg;
        unsigned long flags = 0;
@@ -288,6 +288,8 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
        }
 
        while (length) {
+               unsigned int uninitialized_var(p_off);
+
                if (host->req->long_data) {
                        pg = nth_page(sg_page(&host->req->sg),
                                      off >> PAGE_SHIFT);