ethernet: sun: add check for the mdesc_grab()
[ Upstream commit
b40fa0e046c1838506e41a74819a93c4ce0a8647 ]
In vnet_port_probe() and vsw_port_probe(), we should
check the return value of mdesc_grab() as it may
return NULL which can caused NPD bugs.
Fixes: 2f381d2330e7 ("ldmvsw: Add ldmvsw.c driver code")
Fixes: 136a29bb9255 ("[SPARC64]: Abstract out mdesc accesses for better MD update handling.")
Signed-off-by: Liang He <windhl@126.com>
Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>