[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170614025552.GC16215@lunn.ch>
Date: Wed, 14 Jun 2017 04:55:52 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Salil Mehta <salil.mehta@...wei.com>
Cc: davem@...emloft.net, yisen.zhuang@...wei.com,
huangdaode@...ilicon.com, lipeng321@...wei.com,
mehta.salil.lnk@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linuxarm@...wei.com
Subject: Re: [PATCH V2 net-next 6/8] net: hns3: Add MDIO support to HNS3
Ethernet driver for hip08 SoC
> + if (le16_to_cpu(HCLGE_MDIO_STA_VAL(mdio_cmd->sta))) {
> + dev_err(&hdev->pdev->dev, "mdio read data error\n");
> + return -ENOMEM;
> + }
If it is not zero, it is an error. !0 is always !0, big or little
endian, so there is no point doing the le16_to_cpu().
Where is the memory allocation which failed?
Andrew
Powered by blists - more mailing lists