Skip to content
Commit ee02a4ef authored by Thomas Chou's avatar Thomas Chou Committed by David S. Miller
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarThomas Chou <thomas@wytron.com.tw>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 253683bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment