Skip to content

Commit 8195096

Browse files
akpm00torvalds
authored andcommitted
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>
1 parent d3597ea commit 8195096

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/memstick/host/jmb38x_ms.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
274274
{
275275
unsigned int length;
276276
unsigned int off;
277-
unsigned int t_size, p_off, p_cnt;
277+
unsigned int t_size, p_cnt;
278278
unsigned char *buf;
279279
struct page *pg;
280280
unsigned long flags = 0;
@@ -288,6 +288,8 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
288288
}
289289

290290
while (length) {
291+
unsigned int uninitialized_var(p_off);
292+
291293
if (host->req->long_data) {
292294
pg = nth_page(sg_page(&host->req->sg),
293295
off >> PAGE_SHIFT);

0 commit comments

Comments
 (0)