"map" is a valid pointer. We wanted to return "err" instead. Also
let's return a zero literal at the end.
Fixes:
174a79ff9515 ("bpf: sockmap with sk redirect support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
fdput(f);
bpf_prog_put(prog1);
bpf_prog_put(prog2);
- return PTR_ERR(map);
+ return err;
}
fdput(f);
- return err;
+ return 0;
}
static int bpf_prog_attach(const union bpf_attr *attr)