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)
commit451395f798a3f0a9f257338bc1fbce9a1d6eaf52
treeb2daa1bf597bed70ba37f39b6b00d9c9f7f6d37f
parentd39e8b92c34113e0e406c9853d655b1350a15624
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