net: ravb: Use pm_runtime_resume_and_get()
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tue, 28 Nov 2023 08:04:35 +0000 (10:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 07:52:23 +0000 (08:52 +0100)
commit4782f4b74268f6217984b7ff295d8d19a04ff9f1
tree2df2181805673f9c461cf806eec53cf84f0ad382
parentc870191fc87c4c15ab6b7a2c72e1a98d29af9210
net: ravb: Use pm_runtime_resume_and_get()

[ Upstream commit 88b74831faaee455c2af380382d979fc38e79270 ]

pm_runtime_get_sync() may return an error. In case it returns with an error
dev->power.usage_count needs to be decremented. pm_runtime_resume_and_get()
takes care of this. Thus use it.

Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/renesas/ravb_main.c