]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ethernet: micrel: fix some error codes
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 16 Mar 2016 07:45:10 +0000 (10:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Mar 2016 23:39:54 +0000 (19:39 -0400)
commit3af0d554c1ce11e9d0953381ff566271f9ab81a9
treed263f7c327d7015572cefd06411d912bbd70e7ee
parent3004932c804255cc0ed97f2afa31c6d252fed89e
ethernet: micrel: fix some error codes

There were two issues here:
1) dma_mapping_error() return true/false but we want to return -ENOMEM
2) If dmaengine_prep_slave_sg() failed then "err" wasn't set but
   presumably that should be -ENOMEM as well.

I changed the success path to "return 0;" instead of "return ret;" for
clarity.

Fixes: 94fe8c683cea ('ks8842: Support DMA when accessed via timberdale')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/micrel/ks8842.c