Re: [PATCH net-next] mvpp2: fix pointer check
From: David Miller
Date: Tue Jul 07 2020 - 16:03:41 EST
From: Matteo Croce <mcroce@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 7 Jul 2020 15:19:13 +0200
> From: Matteo Croce <mcroce@xxxxxxxxxxxxx>
>
> priv->page_pool is an array, so comparing against it will always return true.
> Do a meaningful check by checking priv->page_pool[0] instead.
> While at it, clear the page_pool pointers on deallocation, or when an
> allocation error happens during init.
>
> Reported-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> Fixes: c2d6fe6163de ("mvpp2: XDP TX support")
> Signed-off-by: Matteo Croce <mcroce@xxxxxxxxxxxxx>
Applied.