* [PATCH] PCI: mediatek: Fix unchecked return value
@ 2018-07-20 15:01 Gustavo A. R. Silva
2018-09-05 8:50 ` Honghui Zhang
2018-09-18 10:46 ` Lorenzo Pieralisi
0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-20 15:01 UTC (permalink / raw)
To: Ryder Lee, Lorenzo Pieralisi, Bjorn Helgaas
Cc: linux-pci, linux-mediatek, linux-kernel, Gustavo A. R. Silva
Check return value of devm_pci_remap_iospace.
Notice that, currently, all instances of devm_pci_remap_iospace
are being checked.
Addresses-Coverity-ID: 1471965 ("Unchecked return value")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/pci/controller/pcie-mediatek.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index 861dda6..1477939 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -1109,7 +1109,9 @@ static int mtk_pcie_request_resources(struct mtk_pcie *pcie)
if (err < 0)
return err;
- devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
+ err = devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
+ if (err)
+ return err;
return 0;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: mediatek: Fix unchecked return value
2018-07-20 15:01 [PATCH] PCI: mediatek: Fix unchecked return value Gustavo A. R. Silva
@ 2018-09-05 8:50 ` Honghui Zhang
2018-09-18 10:46 ` Lorenzo Pieralisi
1 sibling, 0 replies; 4+ messages in thread
From: Honghui Zhang @ 2018-09-05 8:50 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Ryder Lee, Lorenzo Pieralisi, Bjorn Helgaas, linux-pci,
linux-mediatek, linux-kernel
On Fri, 2018-07-20 at 10:01 -0500, Gustavo A. R. Silva wrote:
> Check return value of devm_pci_remap_iospace.
>
> Notice that, currently, all instances of devm_pci_remap_iospace
> are being checked.
>
> Addresses-Coverity-ID: 1471965 ("Unchecked return value")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/pci/controller/pcie-mediatek.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Hi, Gustavo, thanks for your help.
Acked-by: Honghui Zhang <honghui.zhang@mediatek.com>
> diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
> index 861dda6..1477939 100644
> --- a/drivers/pci/controller/pcie-mediatek.c
> +++ b/drivers/pci/controller/pcie-mediatek.c
> @@ -1109,7 +1109,9 @@ static int mtk_pcie_request_resources(struct mtk_pcie *pcie)
> if (err < 0)
> return err;
>
> - devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
> + err = devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
> + if (err)
> + return err;
>
> return 0;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: mediatek: Fix unchecked return value
@ 2018-09-05 8:50 ` Honghui Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Honghui Zhang @ 2018-09-05 8:50 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Ryder Lee, Lorenzo Pieralisi, Bjorn Helgaas, linux-pci,
linux-mediatek, linux-kernel
On Fri, 2018-07-20 at 10:01 -0500, Gustavo A. R. Silva wrote:
> Check return value of devm_pci_remap_iospace.
>
> Notice that, currently, all instances of devm_pci_remap_iospace
> are being checked.
>
> Addresses-Coverity-ID: 1471965 ("Unchecked return value")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/pci/controller/pcie-mediatek.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Hi, Gustavo, thanks for your help.
Acked-by: Honghui Zhang <honghui.zhang@mediatek.com>
> diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
> index 861dda6..1477939 100644
> --- a/drivers/pci/controller/pcie-mediatek.c
> +++ b/drivers/pci/controller/pcie-mediatek.c
> @@ -1109,7 +1109,9 @@ static int mtk_pcie_request_resources(struct mtk_pcie *pcie)
> if (err < 0)
> return err;
>
> - devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
> + err = devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
> + if (err)
> + return err;
>
> return 0;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: mediatek: Fix unchecked return value
2018-07-20 15:01 [PATCH] PCI: mediatek: Fix unchecked return value Gustavo A. R. Silva
2018-09-05 8:50 ` Honghui Zhang
@ 2018-09-18 10:46 ` Lorenzo Pieralisi
1 sibling, 0 replies; 4+ messages in thread
From: Lorenzo Pieralisi @ 2018-09-18 10:46 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Ryder Lee, Bjorn Helgaas, linux-pci, linux-mediatek, linux-kernel
On Fri, Jul 20, 2018 at 10:01:58AM -0500, Gustavo A. R. Silva wrote:
> Check return value of devm_pci_remap_iospace.
>
> Notice that, currently, all instances of devm_pci_remap_iospace
> are being checked.
>
> Addresses-Coverity-ID: 1471965 ("Unchecked return value")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/pci/controller/pcie-mediatek.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Applied to pci/mediatek for v4.20, thanks.
Lorenzo
> diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
> index 861dda6..1477939 100644
> --- a/drivers/pci/controller/pcie-mediatek.c
> +++ b/drivers/pci/controller/pcie-mediatek.c
> @@ -1109,7 +1109,9 @@ static int mtk_pcie_request_resources(struct mtk_pcie *pcie)
> if (err < 0)
> return err;
>
> - devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
> + err = devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
> + if (err)
> + return err;
>
> return 0;
> }
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-18 10:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20 15:01 [PATCH] PCI: mediatek: Fix unchecked return value Gustavo A. R. Silva
2018-09-05 8:50 ` Honghui Zhang
2018-09-05 8:50 ` Honghui Zhang
2018-09-18 10:46 ` Lorenzo Pieralisi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.