From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] net/cadence/macb: fix kernel Oops if no PHY were discovered during probe
Date: Mon, 26 Aug 2013 09:43:56 +0200 [thread overview]
Message-ID: <521B073C.3070204@atmel.com> (raw)
In-Reply-To: <1377372065-8938-1-git-send-email-b.brezillon@overkiz.com>
On 24/08/2013 21:21, Boris BREZILLON :
> Test the presence of a PHY device before printing attached PHY
> informations.
>
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> drivers/net/ethernet/cadence/macb.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index e866608..fd3b67f 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -1868,8 +1868,10 @@ static int __init macb_probe(struct platform_device *pdev)
> dev->irq, dev->dev_addr);
>
> phydev = bp->phy_dev;
> - netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
> - phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
> + if (phydev)
> + netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
> + phydev->drv->name, dev_name(&phydev->dev),
> + phydev->irq);
>
> return 0;
>
>
--
Nicolas Ferre
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Boris BREZILLON <b.brezillon@overkiz.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] net/cadence/macb: fix kernel Oops if no PHY were discovered during probe
Date: Mon, 26 Aug 2013 09:43:56 +0200 [thread overview]
Message-ID: <521B073C.3070204@atmel.com> (raw)
In-Reply-To: <1377372065-8938-1-git-send-email-b.brezillon@overkiz.com>
On 24/08/2013 21:21, Boris BREZILLON :
> Test the presence of a PHY device before printing attached PHY
> informations.
>
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> drivers/net/ethernet/cadence/macb.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index e866608..fd3b67f 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -1868,8 +1868,10 @@ static int __init macb_probe(struct platform_device *pdev)
> dev->irq, dev->dev_addr);
>
> phydev = bp->phy_dev;
> - netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
> - phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
> + if (phydev)
> + netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
> + phydev->drv->name, dev_name(&phydev->dev),
> + phydev->irq);
>
> return 0;
>
>
--
Nicolas Ferre
next prev parent reply other threads:[~2013-08-26 7:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-24 19:21 [PATCH] net/cadence/macb: fix kernel Oops if no PHY were discovered during probe Boris BREZILLON
2013-08-24 19:21 ` Boris BREZILLON
2013-08-26 7:43 ` Nicolas Ferre [this message]
2013-08-26 7:43 ` Nicolas Ferre
2013-08-26 9:09 ` Bo Shen
2013-08-26 9:09 ` Bo Shen
2013-08-26 12:01 ` boris brezillon
2013-08-26 12:01 ` boris brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=521B073C.3070204@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.