]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvmdio: fix interrupt disable in remove path
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 10 Apr 2017 15:28:09 +0000 (16:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Apr 2017 14:59:11 +0000 (10:59 -0400)
commita5e3eb01285d3423a113472829d1d9bf4da2c0a8
treed39c5d09418f3e4029c94b52c8c5939dd284f7ab
parentac1903ec7dc1a300c3d8de96f78127f4e87a91b9
net: mvmdio: fix interrupt disable in remove path

The pre-existing write to disable interrupts on the remove path happens
whether we have an interrupt or not.  While this may seem to be a good
idea, this driver is re-used in many different implementations, some
where the binding only specifies four bytes of register space.  This
access causes us to access registers outside of the binding.

Make it conditional on the interrupt being present, which is the same
condition used when enabling the interrupt in the first place.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvmdio.c