From: Aditya Pakki Date: Tue, 17 Dec 2019 21:06:19 +0000 (-0600) Subject: hdlcdrv: replace unnecessary assertion in hdlcdrv_register X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a886ca6fcfffd337482352f383c1002c72786b17;p=linux.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index df495b5595f5f..e7413a6439292 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c @@ -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);