net: mvpp2: Fix error return code in mvpp2_open()
authorWang Hai <wanghai38@huawei.com>
Thu, 3 Dec 2020 14:18:06 +0000 (22:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Dec 2020 09:42:03 +0000 (10:42 +0100)
commit9e99b623ecbed292518c0fdbc7c101a79e79d578
tree77b1f1948839aa592ae8d3bd70d0bc8ac031fff7
parent2f8a3f6b2d4bf255b3852beda8561a1e76fc2d22
net: mvpp2: Fix error return code in mvpp2_open()

[ Upstream commit 82a10dc7f0960735f40e8d7d3bee56934291600f ]

Fix to return negative error code -ENOENT from invalid configuration
error handling case instead of 0, as done elsewhere in this function.

Fixes: 4bb043262878 ("net: mvpp2: phylink support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20201203141806.37966-1-wanghai38@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c