On Mon, 16 Nov 2020 21:50:23 +0800 Wang Hai wrote:
good catch.
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 07940c369a6b ("PCI: dwc: Fix MSI page leakage in suspend/resume")what about use the return value of dma_maping_error()? I.E
Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Wang Hai <wanghai38@xxxxxxxxxx>
if (dma_mapping_error(pci->dev, pp->msi_data)) {
dev_err(pci->dev, "Failed to map MSI data\n");
pp->msi_data = 0;
+ ret = -ENOMEM;
ret = dma_mapping_error()
if (ret) {
....
}
.