Subject: null dereference in ethoc_probe()

From: Dan Carpenter <[email-masked]>
Date: Sat, 22 May 2010 17:55:47 +0200

The patch 0baa080c75c: "ethoc: use system memory as buffer" introduced a
potential null dereference.

  1060  free:
  1061          if (priv->dma_alloc)
                    ^^^^^^^^^^^^^^^
	priv can be null here.

  1062                  dma_free_coherent(NULL, priv->dma_alloc, priv->membase,
  1063                          netdev->mem_start);
  1064          free_netdev(netdev);

Also I think the error handling is not as complete as it should be.  It
seems like we should call devm_iounmap() and release some of the other
resources as well.

regards,
dan carpenter