Lines Matching refs:error
295 int error; in create_image() local
297 error = dpm_suspend_end(PMSG_FREEZE); in create_image()
298 if (error) { in create_image()
300 return error; in create_image()
303 error = platform_pre_snapshot(platform_mode); in create_image()
304 if (error || hibernation_test(TEST_PLATFORM)) in create_image()
307 error = pm_sleep_disable_secondary_cpus(); in create_image()
308 if (error || hibernation_test(TEST_CPUS)) in create_image()
315 error = syscore_suspend(); in create_image()
316 if (error) { in create_image()
327 error = swsusp_arch_suspend(); in create_image()
331 if (error) in create_image()
332 pr_err("Error %d creating image\n", error); in create_image()
353 error = arch_resume_nosmt(); in create_image()
359 (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); in create_image()
361 return error; in create_image()
373 int error; in hibernation_snapshot() local
376 error = platform_begin(platform_mode); in hibernation_snapshot()
377 if (error) in hibernation_snapshot()
381 error = hibernate_preallocate_memory(); in hibernation_snapshot()
382 if (error) in hibernation_snapshot()
385 error = freeze_kernel_threads(); in hibernation_snapshot()
386 if (error) in hibernation_snapshot()
399 error = dpm_prepare(PMSG_FREEZE); in hibernation_snapshot()
400 if (error) { in hibernation_snapshot()
408 error = dpm_suspend(PMSG_FREEZE); in hibernation_snapshot()
410 if (error || hibernation_test(TEST_DEVICES)) in hibernation_snapshot()
413 error = create_image(platform_mode); in hibernation_snapshot()
422 if (error || !in_suspend) in hibernation_snapshot()
425 msg = in_suspend ? (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE; in hibernation_snapshot()
428 if (error || !in_suspend) in hibernation_snapshot()
436 return error; in hibernation_snapshot()
461 int error; in resume_target_kernel() local
463 error = dpm_suspend_end(PMSG_QUIESCE); in resume_target_kernel()
464 if (error) { in resume_target_kernel()
466 return error; in resume_target_kernel()
469 error = platform_pre_restore(platform_mode); in resume_target_kernel()
470 if (error) in resume_target_kernel()
475 error = hibernate_resume_nonboot_cpu_disable(); in resume_target_kernel()
476 if (error) in resume_target_kernel()
482 error = syscore_suspend(); in resume_target_kernel()
483 if (error) in resume_target_kernel()
487 error = restore_highmem(); in resume_target_kernel()
488 if (!error) { in resume_target_kernel()
489 error = swsusp_arch_resume(); in resume_target_kernel()
495 BUG_ON(!error); in resume_target_kernel()
525 return error; in resume_target_kernel()
538 int error; in hibernation_restore() local
543 error = dpm_suspend_start(PMSG_QUIESCE); in hibernation_restore()
544 if (!error) { in hibernation_restore()
545 error = resume_target_kernel(platform_mode); in hibernation_restore()
551 BUG_ON(!error); in hibernation_restore()
557 return error; in hibernation_restore()
565 int error; in hibernation_platform_enter() local
575 error = hibernation_ops->begin(PMSG_HIBERNATE); in hibernation_platform_enter()
576 if (error) in hibernation_platform_enter()
581 error = dpm_suspend_start(PMSG_HIBERNATE); in hibernation_platform_enter()
582 if (error) { in hibernation_platform_enter()
588 error = dpm_suspend_end(PMSG_HIBERNATE); in hibernation_platform_enter()
589 if (error) in hibernation_platform_enter()
592 error = hibernation_ops->prepare(); in hibernation_platform_enter()
593 if (error) in hibernation_platform_enter()
596 error = pm_sleep_disable_secondary_cpus(); in hibernation_platform_enter()
597 if (error) in hibernation_platform_enter()
604 error = -EAGAIN; in hibernation_platform_enter()
633 return error; in hibernation_platform_enter()
646 int error; in power_down() local
649 error = suspend_devices_and_enter(mem_sleep_current); in power_down()
650 if (error) { in power_down()
656 error = swsusp_unmark(); in power_down()
657 if (error) in power_down()
689 int error; in load_image_and_restore() local
695 error = create_basic_memory_bitmaps(); in load_image_and_restore()
696 if (error) { in load_image_and_restore()
701 error = swsusp_read(&flags); in load_image_and_restore()
703 if (!error) in load_image_and_restore()
704 error = hibernation_restore(flags & SF_PLATFORM_MODE); in load_image_and_restore()
712 return error; in load_image_and_restore()
722 int error; in hibernate() local
732 error = -EBUSY; in hibernate()
738 error = pm_notifier_call_chain_robust(PM_HIBERNATION_PREPARE, PM_POST_HIBERNATION); in hibernate()
739 if (error) in hibernate()
744 error = freeze_processes(); in hibernate()
745 if (error) in hibernate()
750 error = create_basic_memory_bitmaps(); in hibernate()
751 if (error) in hibernate()
754 error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); in hibernate()
755 if (error || freezer_test_done) in hibernate()
769 error = swsusp_write(flags); in hibernate()
771 if (!error) { in hibernate()
789 error = swsusp_check(false); in hibernate()
790 if (!error) in hibernate()
791 error = load_image_and_restore(false); in hibernate()
806 return error; in hibernate()
819 int error; in hibernate_quiet_exec() local
824 error = -EBUSY; in hibernate_quiet_exec()
830 error = pm_notifier_call_chain_robust(PM_HIBERNATION_PREPARE, PM_POST_HIBERNATION); in hibernate_quiet_exec()
831 if (error) in hibernate_quiet_exec()
834 error = freeze_processes(); in hibernate_quiet_exec()
835 if (error) in hibernate_quiet_exec()
842 error = platform_begin(true); in hibernate_quiet_exec()
843 if (error) in hibernate_quiet_exec()
846 error = freeze_kernel_threads(); in hibernate_quiet_exec()
847 if (error) in hibernate_quiet_exec()
850 error = dpm_prepare(PMSG_FREEZE); in hibernate_quiet_exec()
851 if (error) in hibernate_quiet_exec()
856 error = dpm_suspend(PMSG_FREEZE); in hibernate_quiet_exec()
857 if (error) in hibernate_quiet_exec()
860 error = dpm_suspend_end(PMSG_FREEZE); in hibernate_quiet_exec()
861 if (error) in hibernate_quiet_exec()
864 error = platform_pre_snapshot(true); in hibernate_quiet_exec()
865 if (error) in hibernate_quiet_exec()
868 error = func(data); in hibernate_quiet_exec()
903 return error; in hibernate_quiet_exec()
940 int error; in software_resume() local
948 error = swsusp_check(true); in software_resume()
949 if (error) in software_resume()
954 error = -EBUSY; in software_resume()
961 error = pm_notifier_call_chain_robust(PM_RESTORE_PREPARE, PM_POST_RESTORE); in software_resume()
962 if (error) in software_resume()
966 error = freeze_processes(); in software_resume()
967 if (error) in software_resume()
970 error = freeze_kernel_threads(); in software_resume()
971 if (error) { in software_resume()
976 error = load_image_and_restore(true); in software_resume()
982 pr_info("resume failed (%d)\n", error); in software_resume()
988 return error; in software_resume()
1018 int error = find_resume_device(); in software_resume_initcall() local
1020 if (error) in software_resume_initcall()
1021 return error; in software_resume_initcall()
1105 int error = 0; in disk_store() local
1138 error = -EINVAL; in disk_store()
1141 error = -EINVAL; in disk_store()
1143 if (!error) in disk_store()
1147 return error ? error : n; in disk_store()
1166 int error; in resume_store() local
1177 error = lookup_bdev(name, &dev); in resume_store()
1178 if (error) { in resume_store()
1182 error = 0; in resume_store()
1188 error = -EINVAL; in resume_store()
1192 error = -EINVAL; in resume_store()
1196 if (error) in resume_store()
1197 return error; in resume_store()