[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161219.110420.1570801461162159172.davem@davemloft.net>
Date: Mon, 19 Dec 2016 11:04:20 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: arvind.yadav.cs@...il.com
Cc: peter.chen@....com, fw@...len.de, david.daney@...ium.com,
f.fainelli@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [v3] net: ethernet: cavium: octeon: octeon_mgmt: Handle return
NULL error from devm_ioremap
From: Arvind Yadav <arvind.yadav.cs@...il.com>
Date: Thu, 15 Dec 2016 00:33:30 +0530
> Here, If devm_ioremap will fail. It will return NULL.
> Kernel can run into a NULL-pointer dereference.
> This error check will avoid NULL pointer dereference.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
Since ioremap() is in fact designed to possibly fail, we do
need to always check it's return value. So this change is
correct and I have applied it to the 'net' tree.
Thanks.
Powered by blists - more mailing lists