Re: [PATCH] can: mcp251xfd: fix wrong check in mcp251xfd_handle_rxif_one

2021-01-13 Thread Manivannan Sadhasivam
On Wed, Jan 13, 2021 at 03:31:00PM +0800, Qinglang Miao wrote: > If alloc_canfd_skb returns NULL, 'cfg' is an uninitialized > variable, so we should check 'skb' rather than 'cfd' after > calling alloc_canfd_skb(priv->ndev, ). > > Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip

Re: [PATCH] can: mcp251xfd: fix wrong check in mcp251xfd_handle_rxif_one

2021-01-12 Thread Marc Kleine-Budde
On 1/13/21 8:31 AM, Qinglang Miao wrote: > If alloc_canfd_skb returns NULL, 'cfg' is an uninitialized > variable, so we should check 'skb' rather than 'cfd' after > calling alloc_canfd_skb(priv->ndev, ). > > Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI > CAN") >

[PATCH] can: mcp251xfd: fix wrong check in mcp251xfd_handle_rxif_one

2021-01-12 Thread Qinglang Miao
If alloc_canfd_skb returns NULL, 'cfg' is an uninitialized variable, so we should check 'skb' rather than 'cfd' after calling alloc_canfd_skb(priv->ndev, ). Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") Signed-off-by: Qinglang Miao ---