lkml.org 
[lkml]   [2017]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net v2 5/5] net: qcom/emac: fix of_node and phydev leaks
From
Date
On 11/24/2016 12:21 PM, Johan Hovold wrote:
> + if (!has_acpi_companion(&pdev->dev))
> + put_device(&adpt->phydev->mdio.dev);

I was wondering if, instead of calling put_device() only on non-ACPI systems,
would it be better if on an ACPI system I called get_device() manually? That
is, some thing like this:

int emac_phy_config(struct platform_device *pdev, struct emac_adapter *adpt)
{
...
if (has_acpi_companion(&pdev->dev)) {
...
get_device(&mii_bus->dev);
} else {
...

--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

\
 
 \ /
  Last update: 2017-01-09 20:50    [W:1.736 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site