1
0

071-v4.8-0007-net-ethernet-bgmac-Remove-redundant-dev_err-call-in-.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From ce3a380dddd0cb16cb3d8d947b69657d7646c121 Mon Sep 17 00:00:00 2001
  2. From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
  3. Date: Wed, 13 Jul 2016 12:46:57 +0000
  4. Subject: [PATCH] net: ethernet: bgmac: Remove redundant dev_err call in
  5. bgmac_probe()
  6. There is a error message within devm_ioremap_resource
  7. already, so remove the dev_err call to avoid redundant
  8. error message.
  9. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
  10. Signed-off-by: David S. Miller <davem@davemloft.net>
  11. ---
  12. drivers/net/ethernet/broadcom/bgmac-platform.c | 8 ++------
  13. 1 file changed, 2 insertions(+), 6 deletions(-)
  14. --- a/drivers/net/ethernet/broadcom/bgmac-platform.c
  15. +++ b/drivers/net/ethernet/broadcom/bgmac-platform.c
  16. @@ -129,10 +129,8 @@ static int bgmac_probe(struct platform_d
  17. }
  18. bgmac->plat.base = devm_ioremap_resource(&pdev->dev, regs);
  19. - if (IS_ERR(bgmac->plat.base)) {
  20. - dev_err(&pdev->dev, "Unable to map base resource\n");
  21. + if (IS_ERR(bgmac->plat.base))
  22. return PTR_ERR(bgmac->plat.base);
  23. - }
  24. regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "idm_base");
  25. if (!regs) {
  26. @@ -141,10 +139,8 @@ static int bgmac_probe(struct platform_d
  27. }
  28. bgmac->plat.idm_base = devm_ioremap_resource(&pdev->dev, regs);
  29. - if (IS_ERR(bgmac->plat.idm_base)) {
  30. - dev_err(&pdev->dev, "Unable to map idm resource\n");
  31. + if (IS_ERR(bgmac->plat.idm_base))
  32. return PTR_ERR(bgmac->plat.idm_base);
  33. - }
  34. bgmac->read = platform_bgmac_read;
  35. bgmac->write = platform_bgmac_write;