aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memstick
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-03-28 17:16:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-28 17:45:23 -0400
commitd250dad64a154a9f95ec3574e2ffc97d9f61a19c (patch)
tree493f5d2b38a486700df643538ec6c941b6259bcd /drivers/memstick
parent4a5691c0f7b65b7aa9d237e55f05e691352caac7 (diff)
memstick: suppress uninitialized-var warning
drivers/memstick/host/tifm_ms.c: In function 'tifm_ms_data_event': drivers/memstick/host/tifm_ms.c:185: 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/memstick')
-rw-r--r--drivers/memstick/host/tifm_ms.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c
index eb150dfb637f..8577de4ebb0e 100644
--- a/drivers/memstick/host/tifm_ms.c
+++ b/drivers/memstick/host/tifm_ms.c
@@ -182,7 +182,7 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
182 struct tifm_dev *sock = host->dev; 182 struct tifm_dev *sock = host->dev;
183 unsigned int length; 183 unsigned int length;
184 unsigned int off; 184 unsigned int off;
185 unsigned int t_size, p_off, p_cnt; 185 unsigned int t_size, p_cnt;
186 unsigned char *buf; 186 unsigned char *buf;
187 struct page *pg; 187 struct page *pg;
188 unsigned long flags = 0; 188 unsigned long flags = 0;
@@ -198,6 +198,8 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
198 host->block_pos); 198 host->block_pos);
199 199
200 while (length) { 200 while (length) {
201 unsigned int uninitialized_var(p_off);
202
201 if (host->req->long_data) { 203 if (host->req->long_data) {
202 pg = nth_page(sg_page(&host->req->sg), 204 pg = nth_page(sg_page(&host->req->sg),
203 off >> PAGE_SHIFT); 205 off >> PAGE_SHIFT);