lkml.org 
[lkml]   [2020]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net] net: ll_temac: Use devm_platform_ioremap_resource_byname()
From
From: Wang Hai <wanghai38@huawei.com>
Date: Thu, 30 Jul 2020 15:24:19 +0800

> platform_get_resource() may fail and return NULL, so we had better
> check its return value to avoid a NULL pointer dereference a bit later
> in the code. Fix it to use devm_platform_ioremap_resource_byname()
> instead of calling platform_get_resource_byname() and devm_ioremap().
>
> Fixes: 8425c41d1ef7 ("net: ll_temac: Extend support to non-device-tree platforms")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>

Applied to net-next.

\
 
 \ /
  Last update: 2020-07-31 02:45    [W:0.130 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site