Lines Matching refs:err
99 int err = 0, num_objs = 0; in bpf_seq_read() local
109 err = -ENOMEM; in bpf_seq_read()
116 err = copy_to_user(buf, seq->buf + seq->from, n); in bpf_seq_read()
117 if (err) { in bpf_seq_read()
118 err = -EFAULT; in bpf_seq_read()
132 err = PTR_ERR(p); in bpf_seq_read()
138 err = seq->op->show(seq, p); in bpf_seq_read()
139 if (err > 0) { in bpf_seq_read()
145 } else if (err < 0 || seq_has_overflowed(seq)) { in bpf_seq_read()
146 if (!err) in bpf_seq_read()
147 err = -E2BIG; in bpf_seq_read()
178 err = -EAGAIN; in bpf_seq_read()
185 err = seq->op->show(seq, p); in bpf_seq_read()
186 if (err > 0) { in bpf_seq_read()
189 } else if (err < 0 || seq_has_overflowed(seq)) { in bpf_seq_read()
192 if (!err) in bpf_seq_read()
193 err = -E2BIG; in bpf_seq_read()
207 err = PTR_ERR(p); in bpf_seq_read()
218 err = -E2BIG; in bpf_seq_read()
225 err = copy_to_user(buf, seq->buf, n); in bpf_seq_read()
226 if (err) { in bpf_seq_read()
227 err = -EFAULT; in bpf_seq_read()
235 copied = err; in bpf_seq_read()
516 int err; in bpf_iter_link_attach() local
529 err = bpf_check_uarg_tail_zero(ulinfo, sizeof(linfo), in bpf_iter_link_attach()
531 if (err) in bpf_iter_link_attach()
532 return err; in bpf_iter_link_attach()
561 err = bpf_link_prime(&link->link, &link_primer); in bpf_iter_link_attach()
562 if (err) { in bpf_iter_link_attach()
564 return err; in bpf_iter_link_attach()
568 err = tinfo->reg_info->attach_target(prog, &linfo, &link->aux); in bpf_iter_link_attach()
569 if (err) { in bpf_iter_link_attach()
571 return err; in bpf_iter_link_attach()
599 int err = 0; in prepare_seq_file() local
612 err = -ENOMEM; in prepare_seq_file()
617 err = seq_info->init_seq_private(priv_data->target_private, &link->aux); in prepare_seq_file()
618 if (err) in prepare_seq_file()
633 return err; in prepare_seq_file()
641 int err, fd; in bpf_iter_new_fd() local
653 err = PTR_ERR(file); in bpf_iter_new_fd()
658 err = prepare_seq_file(file, iter_link, __get_seq_info(iter_link)); in bpf_iter_new_fd()
659 if (err) in bpf_iter_new_fd()
669 return err; in bpf_iter_new_fd()