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
343 error = platform_begin(platform_mode); in hibernation_snapshot()
344 if (error) in hibernation_snapshot()
348 error = hibernate_preallocate_memory(); in hibernation_snapshot()
349 if (error) in hibernation_snapshot()
352 error = freeze_kernel_threads(); in hibernation_snapshot()
353 if (error) in hibernation_snapshot()
366 error = dpm_prepare(PMSG_FREEZE); in hibernation_snapshot()
367 if (error) { in hibernation_snapshot()
375 error = dpm_suspend(PMSG_FREEZE); in hibernation_snapshot()
377 if (error || hibernation_test(TEST_DEVICES)) in hibernation_snapshot()
380 error = create_image(platform_mode); in hibernation_snapshot()
389 if (error || !in_suspend) in hibernation_snapshot()
392 msg = in_suspend ? (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE; in hibernation_snapshot()
395 if (error || !in_suspend) in hibernation_snapshot()
403 return error; in hibernation_snapshot()
423 int error; in resume_target_kernel() local
425 error = dpm_suspend_end(PMSG_QUIESCE); in resume_target_kernel()
426 if (error) { in resume_target_kernel()
429 return error; in resume_target_kernel()
432 error = platform_pre_restore(platform_mode); in resume_target_kernel()
433 if (error) in resume_target_kernel()
436 error = disable_nonboot_cpus(); in resume_target_kernel()
437 if (error) in resume_target_kernel()
442 error = syscore_suspend(); in resume_target_kernel()
443 if (error) in resume_target_kernel()
447 error = restore_highmem(); in resume_target_kernel()
448 if (!error) { in resume_target_kernel()
449 error = swsusp_arch_resume(); in resume_target_kernel()
455 BUG_ON(!error); in resume_target_kernel()
484 return error; in resume_target_kernel()
496 int error; in hibernation_restore() local
501 error = dpm_suspend_start(PMSG_QUIESCE); in hibernation_restore()
502 if (!error) { in hibernation_restore()
503 error = resume_target_kernel(platform_mode); in hibernation_restore()
509 BUG_ON(!error); in hibernation_restore()
515 return error; in hibernation_restore()
523 int error; in hibernation_platform_enter() local
533 error = hibernation_ops->begin(); in hibernation_platform_enter()
534 if (error) in hibernation_platform_enter()
539 error = dpm_suspend_start(PMSG_HIBERNATE); in hibernation_platform_enter()
540 if (error) { in hibernation_platform_enter()
546 error = dpm_suspend_end(PMSG_HIBERNATE); in hibernation_platform_enter()
547 if (error) in hibernation_platform_enter()
550 error = hibernation_ops->prepare(); in hibernation_platform_enter()
551 if (error) in hibernation_platform_enter()
554 error = disable_nonboot_cpus(); in hibernation_platform_enter()
555 if (error) in hibernation_platform_enter()
561 error = -EAGAIN; in hibernation_platform_enter()
589 return error; in hibernation_platform_enter()
602 int error; in power_down() local
617 error = suspend_devices_and_enter(PM_SUSPEND_MEM); in power_down()
618 if (error) { in power_down()
628 error = swsusp_unmark(); in power_down()
629 if (error) in power_down()
650 int error; in hibernate() local
660 error = -EBUSY; in hibernate()
665 error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE); in hibernate()
666 if (error) in hibernate()
673 error = freeze_processes(); in hibernate()
674 if (error) in hibernate()
679 error = create_basic_memory_bitmaps(); in hibernate()
680 if (error) in hibernate()
683 error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); in hibernate()
684 if (error || freezer_test_done) in hibernate()
698 error = swsusp_write(flags); in hibernate()
700 if (!error) in hibernate()
722 return error; in hibernate()
743 int error; in software_resume() local
768 error = -ENOENT; in software_resume()
808 error = -ENODEV; in software_resume()
818 error = swsusp_check(); in software_resume()
819 if (error) in software_resume()
824 error = -EBUSY; in software_resume()
830 error = pm_notifier_call_chain(PM_RESTORE_PREPARE); in software_resume()
831 if (error) in software_resume()
835 error = freeze_processes(); in software_resume()
836 if (error) in software_resume()
842 error = create_basic_memory_bitmaps(); in software_resume()
843 if (error) in software_resume()
846 error = swsusp_read(&flags); in software_resume()
848 if (!error) in software_resume()
865 return error; in software_resume()
946 int error = 0; in disk_store() local
979 error = -EINVAL; in disk_store()
982 error = -EINVAL; in disk_store()
984 if (!error) in disk_store()
988 return error ? error : n; in disk_store()