aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-03-19 20:01:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-19 21:53:37 -0400
commit8195096bf2e3756264561d7a47d547bafd4e9100 (patch)
treed71f410591f48f6e71aa361609e943241a4dc116 /drivers
parentd3597ea2f2fa71695ab8204691ff4562aea8357b (diff)
memstick: drivers/memstick/host/jmb38x_ms.c: suppress uninitialized var warning
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/memstick/host/jmb38x_ms.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
index fcfa24b7b1db..9a57504183c7 100644
--- a/drivers/memstick/host/jmb38x_ms.c
+++ b/drivers/memstick/host/jmb38x_ms.c
@@ -274,7 +274,7 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
274{ 274{
275 unsigned int length; 275 unsigned int length;
276 unsigned int off; 276 unsigned int off;
277 unsigned int t_size, p_off, p_cnt; 277 unsigned int t_size, p_cnt;
278 unsigned char *buf; 278 unsigned char *buf;
279 struct page *pg; 279 struct page *pg;
280 unsigned long flags = 0; 280 unsigned long flags = 0;
@@ -288,6 +288,8 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
288 } 288 }
289 289
290 while (length) { 290 while (length) {
291 unsigned int uninitialized_var(p_off);
292
291 if (host->req->long_data) { 293 if (host->req->long_data) {
292 pg = nth_page(sg_page(&host->req->sg), 294 pg = nth_page(sg_page(&host->req->sg),
293 off >> PAGE_SHIFT); 295 off >> PAGE_SHIFT);