All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rocker: fix error return code in rocker_probe()
@ 2015-04-16 12:21 weiyj_lk
  2015-04-16 12:47 ` Jiri Pirko
  2015-04-16 16:13 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: weiyj_lk @ 2015-04-16 12:21 UTC (permalink / raw)
  To: Jiri Pirko, Scott Feldman; +Cc: Wei Yongjun, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return -EINVAL from the invalid PCI region size error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/ethernet/rocker/rocker.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index 5cecec2..0cc17f5 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -4293,6 +4293,7 @@ static int rocker_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	if (pci_resource_len(pdev, 0) < ROCKER_PCI_BAR0_SIZE) {
 		dev_err(&pdev->dev, "invalid PCI region size\n");
+		err = -EINVAL;
 		goto err_pci_resource_len_check;
 	}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rocker: fix error return code in rocker_probe()
  2015-04-16 12:21 [PATCH] rocker: fix error return code in rocker_probe() weiyj_lk
@ 2015-04-16 12:47 ` Jiri Pirko
  2015-04-16 16:13 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2015-04-16 12:47 UTC (permalink / raw)
  To: weiyj_lk; +Cc: Scott Feldman, Wei Yongjun, netdev

Thu, Apr 16, 2015 at 02:21:02PM CEST, weiyj_lk@163.com wrote:
>From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
>Fix to return -EINVAL from the invalid PCI region size error
>handling case instead of 0, as done elsewhere in this function.
>
>Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>


Good catch.

Acked-by: Jiri Pirko <jiri@resnulli.us>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rocker: fix error return code in rocker_probe()
  2015-04-16 12:21 [PATCH] rocker: fix error return code in rocker_probe() weiyj_lk
  2015-04-16 12:47 ` Jiri Pirko
@ 2015-04-16 16:13 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-04-16 16:13 UTC (permalink / raw)
  To: weiyj_lk; +Cc: jiri, sfeldma, yongjun_wei, netdev

From: weiyj_lk@163.com
Date: Thu, 16 Apr 2015 20:21:02 +0800

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return -EINVAL from the invalid PCI region size error
> handling case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-16 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16 12:21 [PATCH] rocker: fix error return code in rocker_probe() weiyj_lk
2015-04-16 12:47 ` Jiri Pirko
2015-04-16 16:13 ` David Miller

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.