Skip to content

Commit

Permalink
memstick: suppress uninitialized-var warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
akpm00 authored and torvalds committed Mar 28, 2008
1 parent 4a5691c commit d250dad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/memstick/host/tifm_ms.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
struct tifm_dev *sock = host->dev;
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;
Expand All @@ -198,6 +198,8 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
host->block_pos);

while (length) {
unsigned int uninitialized_var(p_off);

if (host->req->long_data) {
pg = nth_page(sg_page(&host->req->sg),
off >> PAGE_SHIFT);
Expand Down

0 comments on commit d250dad

Please sign in to comment.