This is a note to let you know that I've just added the patch titled ethernet: micrel: fix some error codes to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ethernet-micrel-fix-some-error-codes.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 3af0d554c1ce11e9d0953381ff566271f9ab81a9 Mon Sep 17 00:00:00 2001 From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Date: Wed, 16 Mar 2016 10:45:10 +0300 Subject: ethernet: micrel: fix some error codes From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> commit 3af0d554c1ce11e9d0953381ff566271f9ab81a9 upstream. 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@xxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/micrel/ks8842.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/drivers/net/ethernet/micrel/ks8842.c +++ b/drivers/net/ethernet/micrel/ks8842.c @@ -561,8 +561,8 @@ static int __ks8842_start_new_rx_dma(str sg_init_table(sg, 1); sg_dma_address(sg) = dma_map_single(adapter->dev, ctl->skb->data, DMA_BUFFER_SIZE, DMA_FROM_DEVICE); - err = dma_mapping_error(adapter->dev, sg_dma_address(sg)); - if (unlikely(err)) { + if (dma_mapping_error(adapter->dev, sg_dma_address(sg))) { + err = -ENOMEM; sg_dma_address(sg) = 0; goto out; } @@ -572,8 +572,10 @@ static int __ks8842_start_new_rx_dma(str ctl->adesc = dmaengine_prep_slave_sg(ctl->chan, sg, 1, DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT); - if (!ctl->adesc) + if (!ctl->adesc) { + err = -ENOMEM; goto out; + } ctl->adesc->callback_param = netdev; ctl->adesc->callback = ks8842_dma_rx_cb; @@ -584,7 +586,7 @@ static int __ks8842_start_new_rx_dma(str goto out; } - return err; + return 0; out: if (sg_dma_address(sg)) dma_unmap_single(adapter->dev, sg_dma_address(sg), Patches currently in stable-queue which might be from dan.carpenter@xxxxxxxxxx are queue-4.4/net-moxa-fix-an-error-code.patch queue-4.4/cx23885-uninitialized-variable-in-cx23885_av_work_handler.patch queue-4.4/power-ipaq-micro-battery-freeing-the-wrong-variable.patch queue-4.4/i40e-fix-an-uninitialized-variable-bug.patch queue-4.4/mips-rm7000-double-locking-bug-in-rm7k_tc_disable.patch queue-4.4/btrfs-clean-up-an-error-code-in-btrfs_init_space_info.patch queue-4.4/xprtrdma-checking-for-null-instead-of-is_err.patch queue-4.4/asoc-intel-pass-correct-parameter-in-sst_alloc_stream_mrfld.patch queue-4.4/ath9k_htc-check-for-underflow-in-ath9k_htc_rx_msg.patch queue-4.4/qlcnic-use-the-correct-ring-in-qlcnic_83xx_process_rcv_ring_diag.patch queue-4.4/mips-octeon-off-by-one-in-octeon_irq_gpio_map.patch queue-4.4/qede-uninitialized-variable-in-qede_start_xmit.patch queue-4.4/mfd-lp8788-irq-uninitialized-variable-in-irq-handler.patch queue-4.4/nfc-nci-memory-leak-in-nci_core_conn_create.patch queue-4.4/ethernet-micrel-fix-some-error-codes.patch queue-4.4/am437x-vpfe-fix-an-uninitialized-variable-bug.patch queue-4.4/qlcnic-potential-null-dereference-in-qlcnic_83xx_get_minidump_template.patch queue-4.4/bpf-mips-fix-off-by-one-in-ctx-offset-allocation.patch queue-4.4/mdio-sun4i-oops-in-error-handling-in-probe.patch queue-4.4/vfio-platform-reset-fix-a-warning-message-condition.patch queue-4.4/x86-apic-uv-silence-a-shift-wrapping-warning.patch