Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp25751ybc; Fri, 22 Nov 2019 01:25:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzNZ+Nuk9uBPzBtEQCEHAQV95copdlIzK8UrNBg4fzXxVHt8K27cQsri6lFbdchIA1NfC+M X-Received: by 2002:a17:906:8307:: with SMTP id j7mr20086175ejx.171.1574414715800; Fri, 22 Nov 2019 01:25:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574414715; cv=none; d=google.com; s=arc-20160816; b=oWsrSp8wRtAPm5099aEgBgMNjBfxFhlM//uB3fzd8Zb+4UFZ3T1dJ3uq+i8vEi4Zo2 yDq7Lg+vUJ04XmHWN54xPlk5N5PxvkONeigTjl5NQ34HV2rIYuwgTUG6WUukLljAHBMT CDr7K0WX6txls6bDWNyLqxA9gowqv7+lc1dxxxp40YPOabkOqSSTFFRQy0tSoJmi6Ndt iXCE27Xv3kGjFMsQQajAE2i7vKfcRcVerQzixJpB4bCGq+J25KCW2FQxfqLu+6UfpF8b W5UaGWwSi00FpsU1alPachnTeU7kknT7nEKvMrsQyODemjCgh+16orFvkFO6him25B8K MEzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=QoGoLrw+yd0OesTC5GBNZu06g/ri4zVDSm36TdL3rLw=; b=qoZiZh8FojqRHtTiZit8jgtR/MRH0sP8qnf383RvQfmGZY2nn4gYiyXFjEjFKzXV3/ 6foIJVMsmG1QGGb98JdXtEDo6hw2aseBnTYCI0Tj9pgtVXb9Pqyb9xxOFXN2iZ9LnY+M Fybh2rDZqZt2C+wzFo0U1SO+L85A++Yp2fRhfRsAhflN//kL5eo6mSngMXsaChEtWhXd dzkDhJMZdTloN9KHVZ8yJY3go+fNLU1Q5cPBXAtTsb/qRun9iYeMJyyGsav5aKTX9vtG HzGF2rqv+E2hL9LrDJUZqe/9hKlicjrceIYNnHWN+MKifsJyTZkivZqsyxVsgY4Nc2d2 iMtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intenta.de header.s=dkim1 header.b=pf9FVhFn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intenta.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si3775525eje.263.2019.11.22.01.24.40; Fri, 22 Nov 2019 01:25:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intenta.de header.s=dkim1 header.b=pf9FVhFn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intenta.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726664AbfKVJXC (ORCPT + 99 others); Fri, 22 Nov 2019 04:23:02 -0500 Received: from mail.intenta.de ([178.249.25.132]:44047 "EHLO mail.intenta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbfKVJXB (ORCPT ); Fri, 22 Nov 2019 04:23:01 -0500 X-Greylist: delayed 339 seconds by postgrey-1.27 at vger.kernel.org; Fri, 22 Nov 2019 04:23:01 EST DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=intenta.de; s=dkim1; h=Content-Type:MIME-Version:Message-ID:Subject:CC:To:From:Date; bh=QoGoLrw+yd0OesTC5GBNZu06g/ri4zVDSm36TdL3rLw=; b=pf9FVhFny2MItH0BpjPM3KHNDrj3+KoU8YnLyDf/BZbFHVL44u8PH71CyGKmF62VDWnMW4/gf94nqkcz55EGUR6/35F61VxsDi3p1BRjvX5k+geqswdyyF+Be00azFCuN1bIf4eFRlLUnaQ7bLMVqBxRI2/5DbTGsqJ+1kdlqFBAshqSMho7SA9x002Gek4PsLmLORCf20gIzAMRyUoPfWhljhlzDIHXC1lQng8f8+k8G4HjrWRCH1Qw3z07Osr6zHuVFYKLlyzMrsotNQRkjI7P731fuiDg7yGEC8qfmuNIi/ruvqc4YIdMwpyWAasObQJ47qF9FJ6uG+uwga04jQ==; Date: Fri, 22 Nov 2019 10:17:13 +0100 From: Helmut Grohne To: YueHaibing , , , , CC: , Subject: [PATCH] mdio_bus: revert inadvertent error code change Message-ID: <20191122091711.GA31495@laureti-dev> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: ICSMA002.intenta.de (10.10.16.48) To ICSMA002.intenta.de (10.10.16.48) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The fixed commit inadvertently changes the error code from ENOTSUPP to ENOSYS. Doing so breaks (among other things) probing of macb, which returns -ENOTSUPP as it is now returned from mdiobus_register_reset. Fixes: 1d4639567d97 ("mdio_bus: Fix PTR_ERR applied after initialization to constant") Signed-off-by: Helmut Grohne --- drivers/net/phy/mdio_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 35876562e32a..dbacb0031877 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -65,7 +65,7 @@ static int mdiobus_register_reset(struct mdio_device *mdiodev) reset = devm_reset_control_get_exclusive(&mdiodev->dev, "phy"); if (IS_ERR(reset)) { - if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOSYS) + if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOTSUPP) reset = NULL; else return PTR_ERR(reset); -- 2.20.1