Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756218Ab3ENHJV (ORCPT ); Tue, 14 May 2013 03:09:21 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:64728 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752594Ab3ENHJO (ORCPT ); Tue, 14 May 2013 03:09:14 -0400 MIME-Version: 1.0 In-Reply-To: References: <1368473874-9569-1-git-send-email-laurent.navet@gmail.com> Date: Tue, 14 May 2013 09:09:13 +0200 Message-ID: Subject: Re: [PATCH] net: ethernet: freescale: use devm_ioremap_resource() From: Laurent Navet To: Frank Li Cc: David Miller , "Frank.Li@freescale.com" , Fabio Estevam , Shawn Guo , joe@perches.com, "netdev@vger.kernel.org" , kernel list Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 941 Lines: 29 >> --- a/drivers/net/ethernet/freescale/fec_main.c >> +++ b/drivers/net/ethernet/freescale/fec_main.c >> @@ -1843,8 +1843,6 @@ fec_probe(struct platform_device *pdev) >> pdev->id_entry = of_id->data; >> >> r = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> - if (!r) >> - return -ENXIO; >> > > why remove this check? it's already checked in devm_ioremap_resource in a better way, void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res) { ... if (!res || resource_type(res) != IORESOURCE_MEM) { dev_err(dev, "invalid resource\n"); return ERR_PTR(-EINVAL); } ... Laurent. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/