diff options
-rw-r--r-- | kernel/power/swsusp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 4e90905f0e87..2d9d08f72f76 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -153,13 +153,11 @@ static int swsusp_swap_check(void) /* This is called before saving image */ | |||
153 | { | 153 | { |
154 | int i; | 154 | int i; |
155 | 155 | ||
156 | if (!swsusp_resume_device) | ||
157 | return -ENODEV; | ||
158 | spin_lock(&swap_lock); | 156 | spin_lock(&swap_lock); |
159 | for (i = 0; i < MAX_SWAPFILES; i++) { | 157 | for (i = 0; i < MAX_SWAPFILES; i++) { |
160 | if (!(swap_info[i].flags & SWP_WRITEOK)) | 158 | if (!(swap_info[i].flags & SWP_WRITEOK)) |
161 | continue; | 159 | continue; |
162 | if (is_resume_device(swap_info + i)) { | 160 | if (!swsusp_resume_device || is_resume_device(swap_info + i)) { |
163 | spin_unlock(&swap_lock); | 161 | spin_unlock(&swap_lock); |
164 | root_swap = i; | 162 | root_swap = i; |
165 | return 0; | 163 | return 0; |