On Fri, 2020-10-02 at 08:31 -0700, Jakub Kicinski wrote: > On Fri, 2 Oct 2020 11:09:40 +0200 Johannes Berg wrote: > > From: Johannes Berg <[email protected]> > > > > Since moving the call to this to a dump start() handler we no > > longer need this to deal with being called after having been > > called already. Since that is the preferred way of doing things > > anyway, remove the code necessary for that and simply return > > the pointer (or an ERR_PTR()). > > > > Signed-off-by: Johannes Berg <[email protected]> > > Reviewed-by: Jakub Kicinski <[email protected]> > > > - return netlink_policy_dump_start(op.policy, op.maxattr, &ctx->state); > > + ctx->state = netlink_policy_dump_start(op.policy, op.maxattr); > > + if (IS_ERR(ctx->state)) > > + return PTR_ERR(ctx->state); > > + return 0; > > PTR_ERR_OR_ZERO()?
Hah! I didn't even know about that, thanks. johannes
