]> git.baikalelectronics.ru Git - kernel.git/commit
dm9000: Return an ERR_PTR() in all error conditions of dm9000_parse_dt()
authorTobias Klauser <tklauser@distanz.ch>
Fri, 19 Sep 2014 14:16:25 +0000 (16:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Sep 2014 20:02:34 +0000 (16:02 -0400)
commite57059e08887a7fcbadc689dcba969ed67088ae7
tree42e42132481b8a3f11e4908a31e27878226361b3
parent79580572c10d804b66ed06b0887373a0d37fdf3c
dm9000: Return an ERR_PTR() in all error conditions of dm9000_parse_dt()

In one error condition dm9000_parse_dt() returns NULL, however the
return value is checked using IS_ERR() in dm9000_probe(), leading to the
error not being properly propagated if CONFIG_OF is not enabled or the
device tree data is not available. Fix this by also returning an
ERR_PTR() in this case.

Fixes: 67c8ca7272a8 (net: dm9000: Allow instantiation using device tree)
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/davicom/dm9000.c