Commit d250dad6 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4a5691c0
...@@ -182,7 +182,7 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host) ...@@ -182,7 +182,7 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
struct tifm_dev *sock = host->dev; struct tifm_dev *sock = host->dev;
unsigned int length; unsigned int length;
unsigned int off; unsigned int off;
unsigned int t_size, p_off, p_cnt; unsigned int t_size, p_cnt;
unsigned char *buf; unsigned char *buf;
struct page *pg; struct page *pg;
unsigned long flags = 0; unsigned long flags = 0;
...@@ -198,6 +198,8 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host) ...@@ -198,6 +198,8 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
host->block_pos); host->block_pos);
while (length) { while (length) {
unsigned int uninitialized_var(p_off);
if (host->req->long_data) { if (host->req->long_data) {
pg = nth_page(sg_page(&host->req->sg), pg = nth_page(sg_page(&host->req->sg),
off >> PAGE_SHIFT); off >> PAGE_SHIFT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment