From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934753AbcALJgq (ORCPT ); Tue, 12 Jan 2016 04:36:46 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:39905 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933556AbcALJgl (ORCPT ); Tue, 12 Jan 2016 04:36:41 -0500 Date: Tue, 12 Jan 2016 12:36:21 +0300 From: Dan Carpenter To: Florian Fainelli , Andrew Lunn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch 2/2 -next] phy: remove an unneeded condition Message-ID: <20160112093621.GF29804@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Dan Carpenter diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 3193006..903737a 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -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;