> From: Pan Bian <[email protected]>
> 
> 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 <[email protected]>

The title should have been "[PATCH net 1/1] qed: Set error code on failure".

But the fix itself is sound. Thanks.
BTW, is -ENOMEM the right return code in case of DMA mapping errors?

Acked-by: Yuval Mintz <[email protected]>

Reply via email to