Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1461448 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2016-08-12 22:40 +0200 |
| Last post | 2016-08-14 11:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] net: phy: initialize rc to zero to avoid returning garbage value Colin King <colin.king@canonical.com> - 2016-08-12 22:40 +0200
Re: [PATCH] net: phy: initialize rc to zero to avoid returning garbage value David Miller <davem@davemloft.net> - 2016-08-14 11:30 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2016-08-12 22:40 +0200 |
| Subject | [PATCH] net: phy: initialize rc to zero to avoid returning garbage value |
| Message-ID | <s5rpf-6B6-11@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
In the case where phydev->interrupts is not PHY_INTERRUPT_ENABLED
function vsc85xx_ack_interrupt is returning an uninitialized
garbage value. Fix this by initializing rc to zero.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/phy/mscc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index 2e1de53..ad33390 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -84,7 +84,7 @@ static int vsc85xx_config_init(struct phy_device *phydev)
static int vsc85xx_ack_interrupt(struct phy_device *phydev)
{
- int rc;
+ int rc = 0;
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
rc = phy_read(phydev, MII_VSC85XX_INT_STATUS);
--
2.8.1
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-08-14 11:30 +0200 |
| Subject | Re: [PATCH] net: phy: initialize rc to zero to avoid returning garbage value |
| Message-ID | <s5ZTX-63p-17@gated-at.bofh.it> |
| In reply to | #1461448 |
From: Colin King <colin.king@canonical.com> Date: Fri, 12 Aug 2016 21:29:24 +0100 > From: Colin Ian King <colin.king@canonical.com> > > In the case where phydev->interrupts is not PHY_INTERRUPT_ENABLED > function vsc85xx_ack_interrupt is returning an uninitialized > garbage value. Fix this by initializing rc to zero. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web