[PATCH -next] net: phy: Add missing of_node_put() in xgmiitorgmii_probe()

David Miller davem at davemloft.net
Sun Aug 21 15:29:15 PDT 2016


From: Andrew Lunn <andrew at lunn.ch>
Date: Sat, 20 Aug 2016 19:36:05 +0200

> On Sat, Aug 20, 2016 at 03:26:55PM +0000, Wei Yongjun wrote:
>> This node pointer is returned by of_parse_phandle() with
>> refcount incremented in this function. of_node_put() on it
>> before exitting this function.
> 
> Hi Wei
> 
> You are only releasing on the error path. What about the successful
> path?

Agreed, as far as I can tell we do need to release it unconditionally
here.



More information about the linux-arm-kernel mailing list