Lines Matching refs:error

269 	int error;  in create_image()  local
271 error = dpm_suspend_end(PMSG_FREEZE); in create_image()
272 if (error) { in create_image()
275 return error; in create_image()
278 error = platform_pre_snapshot(platform_mode); in create_image()
279 if (error || hibernation_test(TEST_PLATFORM)) in create_image()
282 error = disable_nonboot_cpus(); in create_image()
283 if (error || hibernation_test(TEST_CPUS)) in create_image()
288 error = syscore_suspend(); in create_image()
289 if (error) { in create_image()
301 error = swsusp_arch_suspend(); in create_image()
303 if (error) in create_image()
305 error); in create_image()
326 (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); in create_image()
328 return error; in create_image()
340 int error; in hibernation_snapshot() local
342 error = platform_begin(platform_mode); in hibernation_snapshot()
343 if (error) in hibernation_snapshot()
347 error = hibernate_preallocate_memory(); in hibernation_snapshot()
348 if (error) in hibernation_snapshot()
351 error = freeze_kernel_threads(); in hibernation_snapshot()
352 if (error) in hibernation_snapshot()
365 error = dpm_prepare(PMSG_FREEZE); in hibernation_snapshot()
366 if (error) { in hibernation_snapshot()
374 error = dpm_suspend(PMSG_FREEZE); in hibernation_snapshot()
376 if (error || hibernation_test(TEST_DEVICES)) in hibernation_snapshot()
379 error = create_image(platform_mode); in hibernation_snapshot()
388 if (error || !in_suspend) in hibernation_snapshot()
391 msg = in_suspend ? (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE; in hibernation_snapshot()
394 if (error || !in_suspend) in hibernation_snapshot()
402 return error; in hibernation_snapshot()
422 int error; in resume_target_kernel() local
424 error = dpm_suspend_end(PMSG_QUIESCE); in resume_target_kernel()
425 if (error) { in resume_target_kernel()
428 return error; in resume_target_kernel()
431 error = platform_pre_restore(platform_mode); in resume_target_kernel()
432 if (error) in resume_target_kernel()
435 error = disable_nonboot_cpus(); in resume_target_kernel()
436 if (error) in resume_target_kernel()
441 error = syscore_suspend(); in resume_target_kernel()
442 if (error) in resume_target_kernel()
446 error = restore_highmem(); in resume_target_kernel()
447 if (!error) { in resume_target_kernel()
448 error = swsusp_arch_resume(); in resume_target_kernel()
454 BUG_ON(!error); in resume_target_kernel()
483 return error; in resume_target_kernel()
495 int error; in hibernation_restore() local
500 error = dpm_suspend_start(PMSG_QUIESCE); in hibernation_restore()
501 if (!error) { in hibernation_restore()
502 error = resume_target_kernel(platform_mode); in hibernation_restore()
508 BUG_ON(!error); in hibernation_restore()
514 return error; in hibernation_restore()
522 int error; in hibernation_platform_enter() local
532 error = hibernation_ops->begin(); in hibernation_platform_enter()
533 if (error) in hibernation_platform_enter()
538 error = dpm_suspend_start(PMSG_HIBERNATE); in hibernation_platform_enter()
539 if (error) { in hibernation_platform_enter()
545 error = dpm_suspend_end(PMSG_HIBERNATE); in hibernation_platform_enter()
546 if (error) in hibernation_platform_enter()
549 error = hibernation_ops->prepare(); in hibernation_platform_enter()
550 if (error) in hibernation_platform_enter()
553 error = disable_nonboot_cpus(); in hibernation_platform_enter()
554 if (error) in hibernation_platform_enter()
560 error = -EAGAIN; in hibernation_platform_enter()
586 return error; in hibernation_platform_enter()
599 int error; in power_down() local
614 error = suspend_devices_and_enter(PM_SUSPEND_MEM); in power_down()
615 if (error) { in power_down()
625 error = swsusp_unmark(); in power_down()
626 if (error) in power_down()
647 int error; in hibernate() local
657 error = -EBUSY; in hibernate()
662 error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE); in hibernate()
663 if (error) in hibernate()
670 error = freeze_processes(); in hibernate()
671 if (error) in hibernate()
676 error = create_basic_memory_bitmaps(); in hibernate()
677 if (error) in hibernate()
680 error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); in hibernate()
681 if (error || freezer_test_done) in hibernate()
695 error = swsusp_write(flags); in hibernate()
697 if (!error) in hibernate()
719 return error; in hibernate()
740 int error; in software_resume() local
765 error = -ENOENT; in software_resume()
805 error = -ENODEV; in software_resume()
815 error = swsusp_check(); in software_resume()
816 if (error) in software_resume()
821 error = -EBUSY; in software_resume()
827 error = pm_notifier_call_chain(PM_RESTORE_PREPARE); in software_resume()
828 if (error) in software_resume()
832 error = freeze_processes(); in software_resume()
833 if (error) in software_resume()
839 error = create_basic_memory_bitmaps(); in software_resume()
840 if (error) in software_resume()
843 error = swsusp_read(&flags); in software_resume()
845 if (!error) in software_resume()
862 return error; in software_resume()
943 int error = 0; in disk_store() local
976 error = -EINVAL; in disk_store()
979 error = -EINVAL; in disk_store()
981 if (!error) in disk_store()
985 return error ? error : n; in disk_store()