mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
[AX.25]: Fix unchecked ax25_protocol_register uses.
Replace ax25_protocol_register by ax25_register_pid which assumes the caller has done the memory allocation. This allows replacing the kmalloc allocations entirely by static allocations. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c9266b99e2
commit
8d5cf596d1
4 changed files with 32 additions and 32 deletions
|
@ -333,7 +333,14 @@ extern void ax25_ds_t3timer_expiry(ax25_cb *);
|
|||
extern void ax25_ds_idletimer_expiry(ax25_cb *);
|
||||
|
||||
/* ax25_iface.c */
|
||||
extern int __must_check ax25_protocol_register(unsigned int, int (*)(struct sk_buff *, ax25_cb *));
|
||||
|
||||
struct ax25_protocol {
|
||||
struct ax25_protocol *next;
|
||||
unsigned int pid;
|
||||
int (*func)(struct sk_buff *, ax25_cb *);
|
||||
};
|
||||
|
||||
extern void ax25_register_pid(struct ax25_protocol *ap);
|
||||
extern void ax25_protocol_release(unsigned int);
|
||||
extern int __must_check ax25_linkfail_register(void (*)(ax25_cb *, int));
|
||||
extern void ax25_linkfail_release(void (*)(ax25_cb *, int));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue