[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:
Ralf Baechle 2006-12-14 15:50:01 -08:00 committed by David S. Miller
parent c9266b99e2
commit 8d5cf596d1
4 changed files with 32 additions and 32 deletions

View file

@ -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));