Searched hist:"0 ff18d2d" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ethernet/qlogic/qed/ |
H A D | qed_ll2.c | 0ff18d2d Sat Dec 03 23:53:53 CST 2016 Pan Bian <bianpan2016@163.com> net: ethernet: qlogic: set error code on failure
When calling dma_mapping_error(), the value of return variable rc is 0. And when the call returns an unexpected value, rc is not set to a negative errno. Thus, it will return 0 on the error path, and its callers cannot detect the bug. This patch fixes the bug, assigning "-ENOMEM" to err.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189041
Signed-off-by: Pan Bian <bianpan2016@163.com> Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net> 0ff18d2d Sat Dec 03 23:53:53 CST 2016 Pan Bian <bianpan2016@163.com> net: ethernet: qlogic: set error code on failure When calling dma_mapping_error(), the value of return variable rc is 0. And when the call returns an unexpected value, rc is not set to a negative errno. Thus, it will return 0 on the error path, and its callers cannot detect the bug. This patch fixes the bug, assigning "-ENOMEM" to err. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189041 Signed-off-by: Pan Bian <bianpan2016@163.com> Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|