]> git.baikalelectronics.ru Git - kernel.git/commit
niu: read property length only if we use it
authorMartin Kaiser <martin@kaiser.cx>
Thu, 29 Jul 2021 07:43:54 +0000 (09:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Aug 2021 09:24:07 +0000 (10:24 +0100)
commitbb5705aa64d7c98c646cae186b08cd9e83307a3b
treeb2daa1bf597bed70ba37f39b6b00d9c9f7f6d37f
parent0d3f2bbef5db9db0b4248a7d93b9bca880b9b7fe
niu: read property length only if we use it

In three places, the driver calls of_get_property and reads the property
length although the length is not used. Update the calls to not request
the length.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/niu.c