[PATCH 2/2] dmaengine: ioat: set error code on failures

2016-12-02 Thread Pan Bian
In function ioat_xor_val_self_test(), when the calls to dma_mapping_error() fail, the value of return variable err is 0 (indicates no error). As a result, the return value may be inconsistent with the execution status. This patch fixes the bug by assigning "-ENOMEM" to err on the error path.

[PATCH 2/2] dmaengine: ioat: set error code on failures

2016-12-02 Thread Pan Bian
In function ioat_xor_val_self_test(), when the calls to dma_mapping_error() fail, the value of return variable err is 0 (indicates no error). As a result, the return value may be inconsistent with the execution status. This patch fixes the bug by assigning "-ENOMEM" to err on the error path.