Lines Matching refs:error
178 * if so configured, and return an error code if that fails.
304 int error;
306 error = dpm_suspend_end(PMSG_FREEZE);
307 if (error) {
309 return error;
312 error = platform_pre_snapshot(platform_mode);
313 if (error || hibernation_test(TEST_PLATFORM))
316 error = pm_sleep_disable_secondary_cpus();
317 if (error || hibernation_test(TEST_CPUS))
324 error = syscore_suspend();
325 if (error) {
336 error = swsusp_arch_suspend();
340 if (error)
341 pr_err("Error %d creating image\n", error);
362 error = arch_resume_nosmt();
368 (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE);
370 return error;
382 int error;
385 error = platform_begin(platform_mode);
386 if (error)
390 error = hibernate_preallocate_memory();
391 if (error)
394 error = freeze_kernel_threads();
395 if (error)
408 error = dpm_prepare(PMSG_FREEZE);
409 if (error) {
417 error = dpm_suspend(PMSG_FREEZE);
419 if (error || hibernation_test(TEST_DEVICES))
422 error = create_image(platform_mode);
431 if (error || !in_suspend)
434 msg = in_suspend ? (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE;
437 if (error || !in_suspend)
445 return error;
470 int error;
472 error = dpm_suspend_end(PMSG_QUIESCE);
473 if (error) {
475 return error;
478 error = platform_pre_restore(platform_mode);
479 if (error)
484 error = hibernate_resume_nonboot_cpu_disable();
485 if (error)
491 error = syscore_suspend();
492 if (error)
496 error = restore_highmem();
497 if (!error) {
498 error = swsusp_arch_resume();
504 BUG_ON(!error);
534 return error;
547 int error;
552 error = dpm_suspend_start(PMSG_QUIESCE);
553 if (!error) {
554 error = resume_target_kernel(platform_mode);
557 * or return with an error. Otherwise things are just
560 BUG_ON(!error);
566 return error;
574 int error;
584 error = hibernation_ops->begin(PMSG_HIBERNATE);
585 if (error)
590 error = dpm_suspend_start(PMSG_HIBERNATE);
591 if (error) {
597 error = dpm_suspend_end(PMSG_HIBERNATE);
598 if (error)
601 error = hibernation_ops->prepare();
602 if (error)
605 error = pm_sleep_disable_secondary_cpus();
606 if (error)
613 error = -EAGAIN;
642 return error;
654 int error;
658 error = suspend_devices_and_enter(mem_sleep_current);
659 if (error) {
665 error = swsusp_unmark();
666 if (error)
679 error = hibernation_platform_enter();
680 if (error == -EAGAIN || error == -EBUSY) {
707 int error;
713 error = create_basic_memory_bitmaps();
714 if (error) {
719 error = swsusp_read(&flags);
721 if (!error)
722 error = hibernation_restore(flags & SF_PLATFORM_MODE);
730 return error;
743 int error;
764 error = -EBUSY;
770 error = pm_notifier_call_chain_robust(PM_HIBERNATION_PREPARE, PM_POST_HIBERNATION);
771 if (error)
776 error = freeze_processes();
777 if (error)
782 error = create_basic_memory_bitmaps();
783 if (error)
786 error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
787 if (error || freezer_test_done)
814 error = swsusp_write(flags);
816 if (!error) {
834 error = swsusp_check(false);
835 if (!error)
836 error = load_image_and_restore();
851 return error;
859 * Return the @func return value or an error code if it cannot be executed.
864 int error;
869 error = -EBUSY;
875 error = pm_notifier_call_chain_robust(PM_HIBERNATION_PREPARE, PM_POST_HIBERNATION);
876 if (error)
879 error = freeze_processes();
880 if (error)
887 error = platform_begin(true);
888 if (error)
891 error = freeze_kernel_threads();
892 if (error)
895 error = dpm_prepare(PMSG_FREEZE);
896 if (error)
901 error = dpm_suspend(PMSG_FREEZE);
902 if (error)
905 error = dpm_suspend_end(PMSG_FREEZE);
906 if (error)
909 error = platform_pre_snapshot(true);
910 if (error)
913 error = func(data);
948 return error;
985 int error;
993 error = swsusp_check(true);
994 if (error)
1008 error = -EOPNOTSUPP;
1015 error = -EBUSY;
1022 error = pm_notifier_call_chain_robust(PM_RESTORE_PREPARE, PM_POST_RESTORE);
1023 if (error)
1027 error = freeze_processes();
1028 if (error)
1031 error = freeze_kernel_threads();
1032 if (error) {
1037 error = load_image_and_restore();
1043 pr_info("resume failed (%d)\n", error);
1049 return error;
1079 int error = find_resume_device();
1081 if (error)
1082 return error;
1170 int error = 0;
1203 error = -EINVAL;
1206 error = -EINVAL;
1208 if (!error)
1212 return error ? error : n;
1231 int error;
1242 error = lookup_bdev(name, &dev);
1243 if (error) {
1247 error = 0;
1253 error = -EINVAL;
1257 error = -EINVAL;
1261 if (error)
1262 return error;