]> git.baikalelectronics.ru Git - kernel.git/commit
net: macb: Fix runtime PM refcounting
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 27 Apr 2020 10:51:20 +0000 (13:51 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 May 2020 03:27:48 +0000 (20:27 -0700)
commitf10c769c66ce60805e5e8d59871a52762078e01b
treec609b09b68e2fe3ec7e492bdb969a1a6a68810a6
parent012a2ced7ccd6609b9eaadfdff9504abdd57fd35
net: macb: Fix runtime PM refcounting

The commit 4b863097b118, while trying to fix an issue,

    ("net: macb: ensure interface is not suspended on at91rm9200")

introduced a refcounting regression, because in error case refcounter
must be balanced. Fix it by calling pm_runtime_put_noidle() in error case.

While here, fix the same mistake in other couple of places.

Fixes: 4b863097b118 ("net: macb: ensure interface is not suspended on at91rm9200")
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c