Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1782105pxy; Mon, 2 Aug 2021 10:03:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY1fPk/FROekDknPSzMoSrIFu1b7lTXvJFvNu76+IbxAxBdlrp/Vqao9fef8RLXcfmgYdt X-Received: by 2002:a1c:2282:: with SMTP id i124mr17869582wmi.166.1627923780892; Mon, 02 Aug 2021 10:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627923780; cv=none; d=google.com; s=arc-20160816; b=S7y93WRZOxKeqTpEFdVK5IOUoA7IJeUlgLdUOWEd5w5W5M0chEMgAf1wb2UGIu+3l1 qrs1pGuowscHWIads5WXAdxuyH6lY7NeWsSNVwoZSWpv+msZ16465uxmm41v5+cwSiLU e3mKYjw0kCOf8U7nyxpcyj9R5B3QfIktl8h5+8wR6G/3meo9QicSQuX/GC1+GVvLPBmG 2Gs9OrDhBIYGhZXZAoYhVhZoeX2/Scm4cGy8PqG8aTGjad5XZ0xR70V/tMbRKsQbOzxp kPeK0jDQpSDkizsbvSaLsuIhWJlF9WtAd1XCtWes6/7sOe4ueXvda7hZRKP8AnEcL4vl 0zBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UsoMyJnsfvRYnpQiazr8qo0ueNMmWMLXgVE8QTX0ACc=; b=fZtb2mfldiuKpgrlcIzFnl6mDaLuGrBrwR8VsbY7kkIzDOTjLaVl5dLL0ga3+gt5Mb +FlI745C+kSYXI7GKwnW9SxeH/6i8Oct8tLhSgzT27xM83wo4cpJg3UtabMeVTq+F+Wq jawIrhc8pR/N8pHXlQRXrhEss2jXsy0/FoWiYCVZw+C83JHhEm1tlCCECJj1xR/ryMHa K2XX1Mg7ZEg9E8VXWbp4LzdKruB3ye3jTalIMUc7UeGW1T3VRSe/Qck0zL9O8iCj27iK 7oHA3xZ4pDieJVFjMbhX3B9Z5xczluL74HOmnChCRTDOb97/0LaWHA/yeUaz+UNaX89N lIxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S8AmlCSn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z26si13710517ejc.486.2021.08.02.10.02.36; Mon, 02 Aug 2021 10:03:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S8AmlCSn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236650AbhHBN7s (ORCPT + 99 others); Mon, 2 Aug 2021 09:59:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:33684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235827AbhHBNy3 (ORCPT ); Mon, 2 Aug 2021 09:54:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 19FDC611C8; Mon, 2 Aug 2021 13:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912369; bh=kE9Bk9DFA1RgdtiMAimfsy3v2qOuPct73DWDjzSZdYw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S8AmlCSnRZgtWZOb+zsRWFBL5NGlmAWD/5g4YKyj0JeBHxB6xD8Yc81+YNfv4r4zN 96XNqsO/6mc4kdNoi3NkqS+rzCS+3ytoTX2fPWoEKclDX8GIZWPVNWaDFukFDfyAH5 bNZcSg/PShwIadXxM+UYqG/FfJu3RLYJkYben1cI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kangjie Lu , Shannon Nelson , "David S. Miller" , Paul Jakma Subject: [PATCH 5.10 21/67] NIU: fix incorrect error return, missed in previous revert Date: Mon, 2 Aug 2021 15:44:44 +0200 Message-Id: <20210802134339.740742388@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134339.023067817@linuxfoundation.org> References: <20210802134339.023067817@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Jakma commit 15bbf8bb4d4ab87108ecf5f4155ec8ffa3c141d6 upstream. Commit 7930742d6, reverting 26fd962, missed out on reverting an incorrect change to a return value. The niu_pci_vpd_scan_props(..) == 1 case appears to be a normal path - treating it as an error and return -EINVAL was breaking VPD_SCAN and causing the driver to fail to load. Fix, so my Neptune card works again. Cc: Kangjie Lu Cc: Shannon Nelson Cc: David S. Miller Cc: Greg Kroah-Hartman Cc: stable Fixes: 7930742d ('Revert "niu: fix missing checks of niu_pci_eeprom_read"') Signed-off-by: Paul Jakma Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/sun/niu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c @@ -8191,8 +8191,9 @@ static int niu_pci_vpd_fetch(struct niu err = niu_pci_vpd_scan_props(np, here, end); if (err < 0) return err; + /* ret == 1 is not an error */ if (err == 1) - return -EINVAL; + return 0; } return 0; }