From: Jiri Slaby Date: Wed, 27 Jan 2010 22:47:56 +0000 (+0100) Subject: PM / Hibernate: Swap, remove useless check from swsusp_read() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=09c09bc618a4ceec387c57542031b4fc35826e16;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git PM / Hibernate: Swap, remove useless check from swsusp_read() It will never reach here if the sws_resume_bdev is erratic. swsusp_read() is called only from software_resume(), but after swsusp_check() which would catch the error state. Signed-off-by: Jiri Slaby Signed-off-by: Rafael J. Wysocki --- diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 09b2b0ae9e9d..1d575733d4e1 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -657,10 +657,6 @@ int swsusp_read(unsigned int *flags_p) struct swsusp_info *header; *flags_p = swsusp_header->flags; - if (IS_ERR(resume_bdev)) { - pr_debug("PM: Image device not initialised\n"); - return PTR_ERR(resume_bdev); - } memset(&snapshot, 0, sizeof(struct snapshot_handle)); error = snapshot_write_next(&snapshot, PAGE_SIZE);