Skip to contentSkip to conversation

phy: remove an unneeded condition

PATCH Applied Dan Carpenter 2 participants 2 messages Jan 12, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 phy: remove an unneeded condition

It used to be that bus->irq was a pointer but after e7f4dc3536a4 ('mdio: Move allocation of interrupts into core') it's an array inside the mdio struct, so it can never be NULL. Let's remove the check.

drivers/net/phy/phy_device.c +1 -1
index 3193006..903737a 100644
@@ -340,7 +340,7 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
 	dev->phy_id = phy_id;
 	if (c45_ids)
 		dev->c45_ids = *c45_ids;
-	dev->irq = bus->irq ? bus->irq[addr] : PHY_POLL;
+	dev->irq = bus->irq[addr];
 	dev_set_name(&mdiodev->dev, PHY_ID_FMT, bus->id, addr);
 
 	dev->state = PHY_DOWN;
maintainer Applied
#1 lore raw

From: Dan Carpenter <[email protected]>
Date: Tue, 12 Jan 2016 12:36:21 +0300

Quoted 5 lines

It used to be that bus->irq was a pointer but after e7f4dc3536a4 ('mdio: Move allocation of interrupts into core') it's an array inside the mdio struct, so it can never be NULL. Let's remove the check.

Applied.