net: ibm: fix possible object reference leak
authorWen Yang <[email protected]>
Fri, 22 Mar 2019 03:04:08 +0000 (11:04 +0800)
committerDavid S. Miller <[email protected]>
Sun, 24 Mar 2019 01:21:24 +0000 (21:21 -0400)
commitbe693df3cf9dd113ff1d2c0d8150199efdba37f6
treede661513d01c85e448bcf06714b9778e60903eac
parentfa3a419d2f674b431d38748cb58fb7da17ee8949
net: ibm: fix possible object reference leak

The call to ehea_get_eth_dn returns a node pointer with refcount
incremented thus it must be explicitly decremented after the last
usage.

Detected by coccinelle with the following warnings:
./drivers/net/ethernet/ibm/ehea/ehea_main.c:3163:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 3154, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <[email protected]>
Cc: Douglas Miller <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/ibm/ehea/ehea_main.c