Lines Matching refs:error
276 int error; in create_image() local
278 error = dpm_suspend_end(PMSG_FREEZE); in create_image()
279 if (error) { in create_image()
281 return error; in create_image()
284 error = platform_pre_snapshot(platform_mode); in create_image()
285 if (error || hibernation_test(TEST_PLATFORM)) in create_image()
288 error = suspend_disable_secondary_cpus(); in create_image()
289 if (error || hibernation_test(TEST_CPUS)) in create_image()
296 error = syscore_suspend(); in create_image()
297 if (error) { in create_image()
308 error = swsusp_arch_suspend(); in create_image()
312 if (error) in create_image()
313 pr_err("Error %d creating hibernation image\n", error); in create_image()
334 error = arch_resume_nosmt(); in create_image()
340 (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); in create_image()
342 return error; in create_image()
354 int error; in hibernation_snapshot() local
357 error = platform_begin(platform_mode); in hibernation_snapshot()
358 if (error) in hibernation_snapshot()
362 error = hibernate_preallocate_memory(); in hibernation_snapshot()
363 if (error) in hibernation_snapshot()
366 error = freeze_kernel_threads(); in hibernation_snapshot()
367 if (error) in hibernation_snapshot()
380 error = dpm_prepare(PMSG_FREEZE); in hibernation_snapshot()
381 if (error) { in hibernation_snapshot()
389 error = dpm_suspend(PMSG_FREEZE); in hibernation_snapshot()
391 if (error || hibernation_test(TEST_DEVICES)) in hibernation_snapshot()
394 error = create_image(platform_mode); in hibernation_snapshot()
403 if (error || !in_suspend) in hibernation_snapshot()
406 msg = in_suspend ? (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE; in hibernation_snapshot()
409 if (error || !in_suspend) in hibernation_snapshot()
417 return error; in hibernation_snapshot()
442 int error; in resume_target_kernel() local
444 error = dpm_suspend_end(PMSG_QUIESCE); in resume_target_kernel()
445 if (error) { in resume_target_kernel()
447 return error; in resume_target_kernel()
450 error = platform_pre_restore(platform_mode); in resume_target_kernel()
451 if (error) in resume_target_kernel()
454 error = hibernate_resume_nonboot_cpu_disable(); in resume_target_kernel()
455 if (error) in resume_target_kernel()
461 error = syscore_suspend(); in resume_target_kernel()
462 if (error) in resume_target_kernel()
466 error = restore_highmem(); in resume_target_kernel()
467 if (!error) { in resume_target_kernel()
468 error = swsusp_arch_resume(); in resume_target_kernel()
474 BUG_ON(!error); in resume_target_kernel()
504 return error; in resume_target_kernel()
517 int error; in hibernation_restore() local
522 error = dpm_suspend_start(PMSG_QUIESCE); in hibernation_restore()
523 if (!error) { in hibernation_restore()
524 error = resume_target_kernel(platform_mode); in hibernation_restore()
530 BUG_ON(!error); in hibernation_restore()
536 return error; in hibernation_restore()
544 int error; in hibernation_platform_enter() local
554 error = hibernation_ops->begin(PMSG_HIBERNATE); in hibernation_platform_enter()
555 if (error) in hibernation_platform_enter()
560 error = dpm_suspend_start(PMSG_HIBERNATE); in hibernation_platform_enter()
561 if (error) { in hibernation_platform_enter()
567 error = dpm_suspend_end(PMSG_HIBERNATE); in hibernation_platform_enter()
568 if (error) in hibernation_platform_enter()
571 error = hibernation_ops->prepare(); in hibernation_platform_enter()
572 if (error) in hibernation_platform_enter()
575 error = suspend_disable_secondary_cpus(); in hibernation_platform_enter()
576 if (error) in hibernation_platform_enter()
583 error = -EAGAIN; in hibernation_platform_enter()
612 return error; in hibernation_platform_enter()
625 int error; in power_down() local
628 error = suspend_devices_and_enter(PM_SUSPEND_MEM); in power_down()
629 if (error) { in power_down()
635 error = swsusp_unmark(); in power_down()
636 if (error) in power_down()
668 int error; in load_image_and_restore() local
674 error = create_basic_memory_bitmaps(); in load_image_and_restore()
675 if (error) in load_image_and_restore()
678 error = swsusp_read(&flags); in load_image_and_restore()
680 if (!error) in load_image_and_restore()
689 return error; in load_image_and_restore()
697 int error, nr_calls = 0; in hibernate() local
708 error = -EBUSY; in hibernate()
714 error = __pm_notifier_call_chain(PM_HIBERNATION_PREPARE, -1, &nr_calls); in hibernate()
715 if (error) { in hibernate()
722 error = freeze_processes(); in hibernate()
723 if (error) in hibernate()
728 error = create_basic_memory_bitmaps(); in hibernate()
729 if (error) in hibernate()
732 error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); in hibernate()
733 if (error || freezer_test_done) in hibernate()
747 error = swsusp_write(flags); in hibernate()
749 if (!error) { in hibernate()
767 error = swsusp_check(); in hibernate()
768 if (!error) in hibernate()
769 error = load_image_and_restore(); in hibernate()
783 return error; in hibernate()
804 int error, nr_calls = 0; in software_resume() local
828 error = -ENOENT; in software_resume()
868 error = -ENODEV; in software_resume()
878 error = swsusp_check(); in software_resume()
879 if (error) in software_resume()
884 error = -EBUSY; in software_resume()
891 error = __pm_notifier_call_chain(PM_RESTORE_PREPARE, -1, &nr_calls); in software_resume()
892 if (error) { in software_resume()
898 error = freeze_processes(); in software_resume()
899 if (error) in software_resume()
901 error = load_image_and_restore(); in software_resume()
906 pr_info("resume from hibernation failed (%d)\n", error); in software_resume()
912 return error; in software_resume()
995 int error = 0; in disk_store() local
1029 error = -EINVAL; in disk_store()
1032 error = -EINVAL; in disk_store()
1034 if (!error) in disk_store()
1038 return error ? error : n; in disk_store()