]> git.baikalelectronics.ru Git - kernel.git/commit
net: pcs-rzn1-miic: fix return value check in miic_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 28 Jun 2022 13:12:59 +0000 (21:12 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Jun 2022 03:57:15 +0000 (20:57 -0700)
commit4e9e53e9730b03aa0efe7b45147f8f497d0ed39e
tree3169d5a5a73624f5fd0ffac6a8d7931443363b9a
parent3b39453e105b1947107c4c0e3ac3708696f2ce7b
net: pcs-rzn1-miic: fix return value check in miic_probe()

On failure, devm_platform_ioremap_resource() returns a ERR_PTR() value
and not NULL. Fix return value checking by using IS_ERR() and return
PTR_ERR() as error value.

Fixes: d2909d765ef7 ("net: pcs: add Renesas MII converter driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Clément Léger <clement.leger@bootlin.com>
Link: https://lore.kernel.org/r/20220628131259.3109124-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/pcs/pcs-rzn1-miic.c