From: <woojung....@microchip.com>
Date: Wed, 5 Aug 2015 21:26:14 +0000

> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index ec8bd34..3ac405f 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> @@ -291,7 +291,7 @@ static int lan78xx_read_reg(struct lan78xx_net *dev, u32 
> index, u32 *data)
>       u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
>       int ret;
>  
> -     BUG_ON(!dev);
> +     WARN_ON_ONCE(!dev);
>  

The debugging check makes no sense at all if you aren't going to crash
immediately due to it.

The subsequent dereference of dev will cause a crash anyways.

So if you're going to change this at all, just kill all of these
NULL pointer debug checks, as they are completely pointless.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to