Skip to content

Commit d250dad

Browse files
akpm00torvalds
authored andcommitted
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>
1 parent 4a5691c commit d250dad

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/memstick/host/tifm_ms.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
182182
struct tifm_dev *sock = host->dev;
183183
unsigned int length;
184184
unsigned int off;
185-
unsigned int t_size, p_off, p_cnt;
185+
unsigned int t_size, p_cnt;
186186
unsigned char *buf;
187187
struct page *pg;
188188
unsigned long flags = 0;
@@ -198,6 +198,8 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
198198
host->block_pos);
199199

200200
while (length) {
201+
unsigned int uninitialized_var(p_off);
202+
201203
if (host->req->long_data) {
202204
pg = nth_page(sg_page(&host->req->sg),
203205
off >> PAGE_SHIFT);

0 commit comments

Comments
 (0)