diff mbox

ARM: mvebu: checking for IS_ERR() instead of NULL

Message ID 20140121065216.GA31535@elgon.mountain (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter Jan. 21, 2014, 6:52 a.m. UTC
of_iomap() returns NULL on error, it doesn't return error pointers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Gregory CLEMENT Jan. 21, 2014, 8:24 a.m. UTC | #1
On 21/01/2014 07:52, Dan Carpenter wrote:
> of_iomap() returns NULL on error, it doesn't return error pointers.
>

Hi Dan,

Thanks for your patch but I already sent this fix yesterday and Jason have
applied. See: http://thread.gmane.org/gmane.linux.ports.arm.kernel/295642


Thanks,

Gregory



> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.c b/arch/arm/mach-mvebu/mvebu-soc-id.c
> index fe4fc1cbdfaf..b4cfbd62709d 100644
> --- a/arch/arm/mach-mvebu/mvebu-soc-id.c
> +++ b/arch/arm/mach-mvebu/mvebu-soc-id.c
> @@ -88,7 +88,7 @@ static int __init mvebu_soc_id_init(void)
>  	}
>  
>  	pci_base = of_iomap(child, 0);
> -	if (IS_ERR(pci_base)) {
> +	if (!pci_base) {
>  		pr_err("cannot map registers\n");
>  		ret = -ENOMEM;
>  		goto res_ioremap;
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
Dan Carpenter Jan. 21, 2014, 8:43 a.m. UTC | #2
On Tue, Jan 21, 2014 at 09:24:16AM +0100, Gregory CLEMENT wrote:
> On 21/01/2014 07:52, Dan Carpenter wrote:
> > of_iomap() returns NULL on error, it doesn't return error pointers.
> >
> 
> Hi Dan,
> 
> Thanks for your patch but I already sent this fix yesterday and Jason have
> applied. See: http://thread.gmane.org/gmane.linux.ports.arm.kernel/295642
> 

Cool.  Congrats to Ezequiel on his new corporate email address.  :)

regards,
dan carpenter
diff mbox

Patch

diff --git a/arch/arm/mach-mvebu/mvebu-soc-id.c b/arch/arm/mach-mvebu/mvebu-soc-id.c
index fe4fc1cbdfaf..b4cfbd62709d 100644
--- a/arch/arm/mach-mvebu/mvebu-soc-id.c
+++ b/arch/arm/mach-mvebu/mvebu-soc-id.c
@@ -88,7 +88,7 @@  static int __init mvebu_soc_id_init(void)
 	}
 
 	pci_base = of_iomap(child, 0);
-	if (IS_ERR(pci_base)) {
+	if (!pci_base) {
 		pr_err("cannot map registers\n");
 		ret = -ENOMEM;
 		goto res_ioremap;