ethoc: fix null dereference in ethoc_probe
Dan reported the patch 0baa080c: "ethoc: use system memory as buffer" introduced a potential null dereference. 1060 free: 1061 if (priv->dma_alloc) ^^^^^^^^^^^^^^^ priv can be null here. He also suggested that the error handling is not complete. This patch fixes the null priv issue and improves resources releasing in ethoc_probe() and ethoc_remove(). Reported-by: NDan Carpenter <error27@gmail.com> Signed-off-by: NThomas Chou <thomas@wytron.com.tw> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录