From: Kevin Hao Date: Wed, 28 Jan 2015 12:06:48 +0000 (+0800) Subject: net: gianfar: remove the unneeded check of disabled device X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4b222ca68a7a24501c1a7b7505512e845799dd65;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git net: gianfar: remove the unneeded check of disabled device Since commit cd1e65044d44 ("of/device: Don't register disabled devices"), the disabled device will not be registered at all. So we don't need to do the check again in the platform device driver. Signed-off-by: Kevin Hao Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 93ff846e96f1..43df78882e48 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -764,7 +764,7 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev) u32 *tx_queues, *rx_queues; unsigned short mode, poll_mode; - if (!np || !of_device_is_available(np)) + if (!np) return -ENODEV; if (of_device_is_compatible(np, "fsl,etsec2")) {