Lines Matching refs:ret

59 	int ret;  in bootflow_first_glob()  local
61 ret = bootstd_get_priv(&std); in bootflow_first_glob()
62 if (ret) in bootflow_first_glob()
63 return ret; in bootflow_first_glob()
76 int ret; in bootflow_next_glob() local
78 ret = bootstd_get_priv(&std); in bootflow_next_glob()
79 if (ret) in bootflow_next_glob()
80 return ret; in bootflow_next_glob()
190 int ret; in iter_incr() local
246 ret = -ENOENT; in iter_incr()
250 ret = 0; in iter_incr()
254 ret = bootdev_setup_iter(iter, NULL, &dev, in iter_incr()
262 ret = -ENODEV; in iter_incr()
281 ret = -ENODEV; in iter_incr()
304 ret = bootdev_next_label(iter, &dev, in iter_incr()
308 ret = bootdev_next_prio(iter, &dev); in iter_incr()
311 log_debug("ret=%d, dev=%p %s\n", ret, dev, in iter_incr()
313 if (ret) { in iter_incr()
320 ret = device_probe(dev); in iter_incr()
321 log_debug("probe %s %d\n", dev->name, ret); in iter_incr()
322 if (!log_msg_ret("probe", ret)) in iter_incr()
328 if (ret) in iter_incr()
345 int ret; in bootflow_check() local
349 ret = bootmeth_get_bootflow(iter->method, bflow); in bootflow_check()
350 if (ret) in bootflow_check()
351 return log_msg_ret("glob", ret); in bootflow_check()
357 ret = bootdev_get_bootflow(dev, iter, bflow); in bootflow_check()
360 if (!ret) { in bootflow_check()
367 if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) { in bootflow_check()
369 dev->name, iter->part, iter->method->name, ret); in bootflow_check()
375 return log_msg_ret("all", ret); in bootflow_check()
378 return log_msg_ret("check", ret); in bootflow_check()
385 int ret; in bootflow_scan_first() local
395 ret = bootmeth_setup_iter_order(iter, !(flags & BOOTFLOWIF_SKIP_GLOBAL)); in bootflow_scan_first()
396 if (ret) in bootflow_scan_first()
406 ret = bootdev_setup_iter(iter, label, &dev, &method_flags); in bootflow_scan_first()
407 if (ret) in bootflow_scan_first()
413 ret = bootflow_check(iter, bflow); in bootflow_scan_first()
414 if (ret) { in bootflow_scan_first()
415 log_debug("check - ret=%d\n", ret); in bootflow_scan_first()
416 if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) { in bootflow_scan_first()
418 return log_msg_ret("all", ret); in bootflow_scan_first()
420 iter->err = ret; in bootflow_scan_first()
421 ret = bootflow_scan_next(iter, bflow); in bootflow_scan_first()
422 if (ret) in bootflow_scan_first()
423 return log_msg_ret("get", ret); in bootflow_scan_first()
431 int ret; in bootflow_scan_next() local
434 ret = iter_incr(iter); in bootflow_scan_next()
435 log_debug("iter_incr: ret=%d\n", ret); in bootflow_scan_next()
436 if (ret == BF_NO_MORE_DEVICES) in bootflow_scan_next()
437 return log_msg_ret("done", ret); in bootflow_scan_next()
439 if (!ret) { in bootflow_scan_next()
440 ret = bootflow_check(iter, bflow); in bootflow_scan_next()
441 log_debug("check - ret=%d\n", ret); in bootflow_scan_next()
442 if (!ret) in bootflow_scan_next()
444 iter->err = ret; in bootflow_scan_next()
445 if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) { in bootflow_scan_next()
447 return log_msg_ret("all", ret); in bootflow_scan_next()
450 log_debug("incr failed, err=%d\n", ret); in bootflow_scan_next()
451 iter->err = ret; in bootflow_scan_next()
493 int ret; in bootflow_read_all() local
498 ret = bootmeth_read_all(bflow->method, bflow); in bootflow_read_all()
499 if (ret) in bootflow_read_all()
500 return log_msg_ret("rd2", ret); in bootflow_read_all()
508 int ret; in bootflow_boot() local
513 ret = bootmeth_boot(bflow->method, bflow); in bootflow_boot()
514 if (ret) in bootflow_boot()
515 return log_msg_ret("boot", ret); in bootflow_boot()
527 int ret; in bootflow_run_boot() local
534 ret = bootflow_boot(bflow); in bootflow_run_boot()
536 printf("Boot failed (err=%d)\n", ret); in bootflow_run_boot()
537 return ret; in bootflow_run_boot()
540 switch (ret) { in bootflow_run_boot()
562 printf("Boot failed (err=%d)\n", ret); in bootflow_run_boot()
566 return ret; in bootflow_run_boot()
660 int ret; in on_bootargs() local
662 ret = bootstd_get_priv(&std); in on_bootargs()
663 if (ret) in on_bootargs()
672 ret = bootflow_cmdline_set(bflow, value); in on_bootargs()
673 if (ret && ret != ENOENT) in on_bootargs()
738 int ret; in cmdline_set_arg() local
831 ret = copy_in(to, end, from, arg_end - from, new_val); in cmdline_set_arg()
832 if (ret < 0) in cmdline_set_arg()
833 return ret; in cmdline_set_arg()
834 to += ret; in cmdline_set_arg()
860 ret = copy_in(to, end, set_arg, set_arg_len, new_val); in cmdline_set_arg()
861 log_debug("ret=%d, to: %s buf: %s\n", ret, to, buf); in cmdline_set_arg()
862 if (ret < 0) in cmdline_set_arg()
863 return ret; in cmdline_set_arg()
864 to += ret; in cmdline_set_arg()
883 int ret; in bootflow_cmdline_set_arg() local
885 ret = cmdline_set_arg(buf, sizeof(buf), bflow->cmdline, set_arg, in bootflow_cmdline_set_arg()
887 if (ret < 0) in bootflow_cmdline_set_arg()
888 return ret; in bootflow_cmdline_set_arg()
890 ret = bootflow_cmdline_set(bflow, buf); in bootflow_cmdline_set_arg()
900 ret = env_set("bootargs", bflow->cmdline); in bootflow_cmdline_set_arg()
901 if (ret) in bootflow_cmdline_set_arg()
902 return ret; in bootflow_cmdline_set_arg()
910 int ret; in cmdline_get_arg() local
912 ret = cmdline_set_arg(NULL, 1, cmdline, arg, NULL, posp); in cmdline_get_arg()
914 return ret; in cmdline_get_arg()
920 int ret; in bootflow_cmdline_get_arg() local
923 ret = cmdline_get_arg(bflow->cmdline, arg, &pos); in bootflow_cmdline_get_arg()
924 if (ret < 0) in bootflow_cmdline_get_arg()
925 return ret; in bootflow_cmdline_get_arg()
928 return ret; in bootflow_cmdline_get_arg()
935 int ret; in bootflow_cmdline_auto() local
937 ret = serial_getinfo(gd->cur_serial_dev, &info); in bootflow_cmdline_auto()
938 if (ret) in bootflow_cmdline_auto()
939 return ret; in bootflow_cmdline_auto()
961 ret = bootflow_cmdline_set_arg(bflow, arg, buf, true); in bootflow_cmdline_auto()
962 if (ret) in bootflow_cmdline_auto()
963 return ret; in bootflow_cmdline_auto()
1004 int ret; in bootflow_get_seq() local
1006 ret = bootstd_get_priv(&std); in bootflow_get_seq()
1007 if (ret) in bootflow_get_seq()
1008 return ret; in bootflow_get_seq()