mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
netlink: do not store start function in netlink_cb
->start() is called once when dump is being initialized, there is no need to store it in netlink_cb. Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
c93622b53e
commit
3730cf4dd7
2 changed files with 2 additions and 4 deletions
|
|
@ -2300,7 +2300,6 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
|
|||
|
||||
cb = &nlk->cb;
|
||||
memset(cb, 0, sizeof(*cb));
|
||||
cb->start = control->start;
|
||||
cb->dump = control->dump;
|
||||
cb->done = control->done;
|
||||
cb->nlh = nlh;
|
||||
|
|
@ -2309,8 +2308,8 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
|
|||
cb->min_dump_alloc = control->min_dump_alloc;
|
||||
cb->skb = skb;
|
||||
|
||||
if (cb->start) {
|
||||
ret = cb->start(cb);
|
||||
if (control->start) {
|
||||
ret = control->start(cb);
|
||||
if (ret)
|
||||
goto error_put;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue