Skip to content

Commit

Permalink
mm/frontswap: fix uninit'ed variable warning
Browse files Browse the repository at this point in the history
Fixes uninitialized variable warning on 'type' in frontswap_shrink().
type is set before use by __frontswap_unuse_pages() called by
__frontswap_shrink() called by frontswap_shrink() before use by
try_to_unuse().

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Seth Jennings authored and konradwilk committed Aug 13, 2012
1 parent 1d00015 commit 6b982fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/frontswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ static int __frontswap_shrink(unsigned long target_pages,
void frontswap_shrink(unsigned long target_pages)
{
unsigned long pages_to_unuse = 0;
int type, ret;
int uninitialized_var(type), ret;

/*
* we don't want to hold swap_lock while doing a very
Expand Down

0 comments on commit 6b982fc

Please sign in to comment.