Lines Matching refs:error
272 int error; in create_image() local
274 error = dpm_suspend_end(PMSG_FREEZE); in create_image()
275 if (error) { in create_image()
277 return error; in create_image()
280 error = platform_pre_snapshot(platform_mode); in create_image()
281 if (error || hibernation_test(TEST_PLATFORM)) in create_image()
284 error = disable_nonboot_cpus(); in create_image()
285 if (error || hibernation_test(TEST_CPUS)) in create_image()
292 error = syscore_suspend(); in create_image()
293 if (error) { in create_image()
304 error = swsusp_arch_suspend(); in create_image()
308 if (error) in create_image()
309 pr_err("Error %d creating hibernation image\n", error); in create_image()
332 (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); in create_image()
334 return error; in create_image()
346 int error; in hibernation_snapshot() local
349 error = platform_begin(platform_mode); in hibernation_snapshot()
350 if (error) in hibernation_snapshot()
354 error = hibernate_preallocate_memory(); in hibernation_snapshot()
355 if (error) in hibernation_snapshot()
358 error = freeze_kernel_threads(); in hibernation_snapshot()
359 if (error) in hibernation_snapshot()
372 error = dpm_prepare(PMSG_FREEZE); in hibernation_snapshot()
373 if (error) { in hibernation_snapshot()
381 error = dpm_suspend(PMSG_FREEZE); in hibernation_snapshot()
383 if (error || hibernation_test(TEST_DEVICES)) in hibernation_snapshot()
386 error = create_image(platform_mode); in hibernation_snapshot()
395 if (error || !in_suspend) in hibernation_snapshot()
398 msg = in_suspend ? (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE; in hibernation_snapshot()
401 if (error || !in_suspend) in hibernation_snapshot()
409 return error; in hibernation_snapshot()
434 int error; in resume_target_kernel() local
436 error = dpm_suspend_end(PMSG_QUIESCE); in resume_target_kernel()
437 if (error) { in resume_target_kernel()
439 return error; in resume_target_kernel()
442 error = platform_pre_restore(platform_mode); in resume_target_kernel()
443 if (error) in resume_target_kernel()
446 error = hibernate_resume_nonboot_cpu_disable(); in resume_target_kernel()
447 if (error) in resume_target_kernel()
453 error = syscore_suspend(); in resume_target_kernel()
454 if (error) in resume_target_kernel()
458 error = restore_highmem(); in resume_target_kernel()
459 if (!error) { in resume_target_kernel()
460 error = swsusp_arch_resume(); in resume_target_kernel()
466 BUG_ON(!error); in resume_target_kernel()
496 return error; in resume_target_kernel()
509 int error; in hibernation_restore() local
514 error = dpm_suspend_start(PMSG_QUIESCE); in hibernation_restore()
515 if (!error) { in hibernation_restore()
516 error = resume_target_kernel(platform_mode); in hibernation_restore()
522 BUG_ON(!error); in hibernation_restore()
528 return error; in hibernation_restore()
536 int error; in hibernation_platform_enter() local
546 error = hibernation_ops->begin(); in hibernation_platform_enter()
547 if (error) in hibernation_platform_enter()
552 error = dpm_suspend_start(PMSG_HIBERNATE); in hibernation_platform_enter()
553 if (error) { in hibernation_platform_enter()
559 error = dpm_suspend_end(PMSG_HIBERNATE); in hibernation_platform_enter()
560 if (error) in hibernation_platform_enter()
563 error = hibernation_ops->prepare(); in hibernation_platform_enter()
564 if (error) in hibernation_platform_enter()
567 error = disable_nonboot_cpus(); in hibernation_platform_enter()
568 if (error) in hibernation_platform_enter()
575 error = -EAGAIN; in hibernation_platform_enter()
604 return error; in hibernation_platform_enter()
617 int error; in power_down() local
620 error = suspend_devices_and_enter(PM_SUSPEND_MEM); in power_down()
621 if (error) { in power_down()
627 error = swsusp_unmark(); in power_down()
628 if (error) in power_down()
660 int error; in load_image_and_restore() local
666 error = create_basic_memory_bitmaps(); in load_image_and_restore()
667 if (error) in load_image_and_restore()
670 error = swsusp_read(&flags); in load_image_and_restore()
672 if (!error) in load_image_and_restore()
681 return error; in load_image_and_restore()
689 int error, nr_calls = 0; in hibernate() local
700 error = -EBUSY; in hibernate()
706 error = __pm_notifier_call_chain(PM_HIBERNATION_PREPARE, -1, &nr_calls); in hibernate()
707 if (error) { in hibernate()
716 error = freeze_processes(); in hibernate()
717 if (error) in hibernate()
722 error = create_basic_memory_bitmaps(); in hibernate()
723 if (error) in hibernate()
726 error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); in hibernate()
727 if (error || freezer_test_done) in hibernate()
741 error = swsusp_write(flags); in hibernate()
743 if (!error) { in hibernate()
761 error = swsusp_check(); in hibernate()
762 if (!error) in hibernate()
763 error = load_image_and_restore(); in hibernate()
777 return error; in hibernate()
798 int error, nr_calls = 0; in software_resume() local
822 error = -ENOENT; in software_resume()
862 error = -ENODEV; in software_resume()
872 error = swsusp_check(); in software_resume()
873 if (error) in software_resume()
878 error = -EBUSY; in software_resume()
885 error = __pm_notifier_call_chain(PM_RESTORE_PREPARE, -1, &nr_calls); in software_resume()
886 if (error) { in software_resume()
892 error = freeze_processes(); in software_resume()
893 if (error) in software_resume()
895 error = load_image_and_restore(); in software_resume()
900 pr_info("resume from hibernation failed (%d)\n", error); in software_resume()
906 return error; in software_resume()
989 int error = 0; in disk_store() local
1023 error = -EINVAL; in disk_store()
1026 error = -EINVAL; in disk_store()
1028 if (!error) in disk_store()
1032 return error ? error : n; in disk_store()