* [PATCH mips] pci: pci-lantiq: remove duplicate check on resource
@ 2014-10-22 4:01 Varka Bhadram
2014-10-22 6:43 ` John Crispin
0 siblings, 1 reply; 2+ messages in thread
From: Varka Bhadram @ 2014-10-22 4:01 UTC (permalink / raw)
To: linux-mips; +Cc: ralf, Varka Bhadram
Sanity check on resource happening with devm_ioremap_resource()
Signed-off-by: Varka Bhadram <varkab@cdac.in>
---
This patch based on master brnch of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/ralf/linux tree.
Thanks.
arch/mips/pci/pci-lantiq.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
index 37fe8e7..d3ed15b 100644
--- a/arch/mips/pci/pci-lantiq.c
+++ b/arch/mips/pci/pci-lantiq.c
@@ -215,17 +215,12 @@ static int ltq_pci_probe(struct platform_device *pdev)
pci_clear_flags(PCI_PROBE_ONLY);
- res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
res_bridge = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- if (!res_cfg || !res_bridge) {
- dev_err(&pdev->dev, "missing memory resources\n");
- return -EINVAL;
- }
-
ltq_pci_membase = devm_ioremap_resource(&pdev->dev, res_bridge);
if (IS_ERR(ltq_pci_membase))
return PTR_ERR(ltq_pci_membase);
+ res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg);
if (IS_ERR(ltq_pci_mapped_cfg))
return PTR_ERR(ltq_pci_mapped_cfg);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH mips] pci: pci-lantiq: remove duplicate check on resource
2014-10-22 4:01 [PATCH mips] pci: pci-lantiq: remove duplicate check on resource Varka Bhadram
@ 2014-10-22 6:43 ` John Crispin
0 siblings, 0 replies; 2+ messages in thread
From: John Crispin @ 2014-10-22 6:43 UTC (permalink / raw)
To: Varka Bhadram, linux-mips; +Cc: ralf, Varka Bhadram
Hi Vara,
On 22/10/2014 06:01, Varka Bhadram wrote:
> Sanity check on resource happening with devm_ioremap_resource()
>
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
Acked-by: John Crispin <blogic@openwrt.org>
Thanks for the fix !
> ---
>
> This patch based on master brnch of
> https://kernel.googlesource.com/pub/scm/linux/kernel/git/ralf/linux
> tree.
>
> Thanks.
>
> arch/mips/pci/pci-lantiq.c | 7 +------ 1 file changed, 1
> insertion(+), 6 deletions(-)
>
> diff --git a/arch/mips/pci/pci-lantiq.c
> b/arch/mips/pci/pci-lantiq.c index 37fe8e7..d3ed15b 100644 ---
> a/arch/mips/pci/pci-lantiq.c +++ b/arch/mips/pci/pci-lantiq.c @@
> -215,17 +215,12 @@ static int ltq_pci_probe(struct platform_device
> *pdev)
>
> pci_clear_flags(PCI_PROBE_ONLY);
>
> - res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> res_bridge = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if
> (!res_cfg || !res_bridge) { - dev_err(&pdev->dev, "missing memory
> resources\n"); - return -EINVAL; - } - ltq_pci_membase =
> devm_ioremap_resource(&pdev->dev, res_bridge); if
> (IS_ERR(ltq_pci_membase)) return PTR_ERR(ltq_pci_membase);
>
> + res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg); if
> (IS_ERR(ltq_pci_mapped_cfg)) return PTR_ERR(ltq_pci_mapped_cfg);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-22 6:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-22 4:01 [PATCH mips] pci: pci-lantiq: remove duplicate check on resource Varka Bhadram
2014-10-22 6:43 ` John Crispin
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.