mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 05:31:17 -04:00
hdlcdrv: replace unnecessary assertion in hdlcdrv_register
In hdlcdrv_register, failure to register the driver causes a crash. The three callers of hdlcdrv_register all pass valid pointers and do not fail. The patch eliminates the unnecessary BUG_ON assertion. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6791c10260
commit
a886ca6fcf
@@ -687,8 +687,6 @@ struct net_device *hdlcdrv_register(const struct hdlcdrv_ops *ops,
|
||||
struct hdlcdrv_state *s;
|
||||
int err;
|
||||
|
||||
BUG_ON(ops == NULL);
|
||||
|
||||
if (privsize < sizeof(struct hdlcdrv_state))
|
||||
privsize = sizeof(struct hdlcdrv_state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user