2016-02-10 16:59:14

by Anton Protopopov

[permalink] [raw]
Subject: [PATCH] ath10k: fix erroneous return value

The ath10k_pci_hif_exchange_bmi_msg() function may return the positive
value EIO instead of -EIO in case of error.

Signed-off-by: Anton Protopopov <[email protected]>
---
drivers/net/wireless/ath/ath10k/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index ee925c6..526acde 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -1756,7 +1756,7 @@ static int ath10k_pci_hif_exchange_bmi_msg(struct ath10k *ar,
DMA_FROM_DEVICE);
ret = dma_mapping_error(ar->dev, resp_paddr);
if (ret) {
- ret = EIO;
+ ret = -EIO;
goto err_req;
}

--
2.6.5



2016-02-11 23:24:29

by Julian Calaby

[permalink] [raw]
Subject: Re: [PATCH] ath10k: fix erroneous return value

Hi All,

On Thu, Feb 11, 2016 at 3:58 AM, Anton Protopopov
<[email protected]> wrote:
> The ath10k_pci_hif_exchange_bmi_msg() function may return the positive
> value EIO instead of -EIO in case of error.
>
> Signed-off-by: Anton Protopopov <[email protected]>

This looks right to me.

Reviewed-by: Julian Calaby <[email protected]>

> ---
> drivers/net/wireless/ath/ath10k/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
> index ee925c6..526acde 100644
> --- a/drivers/net/wireless/ath/ath10k/pci.c
> +++ b/drivers/net/wireless/ath/ath10k/pci.c
> @@ -1756,7 +1756,7 @@ static int ath10k_pci_hif_exchange_bmi_msg(struct ath10k *ar,
> DMA_FROM_DEVICE);
> ret = dma_mapping_error(ar->dev, resp_paddr);
> if (ret) {
> - ret = EIO;
> + ret = -EIO;
> goto err_req;
> }
>
> --
> 2.6.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/

2016-03-04 08:41:20

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath10k: fix erroneous return value

Anton Protopopov <[email protected]> writes:

> The ath10k_pci_hif_exchange_bmi_msg() function may return the positive
> value EIO instead of -EIO in case of error.
>
> Signed-off-by: Anton Protopopov <[email protected]>

Applied, thanks.

--
Kalle Valo