Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1638348pxy; Mon, 2 Aug 2021 06:50:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFN79S96IY+t6Gka0N5sozlzsZ3yUvisAhTaKRPtu++02RM7gvB/IKx0XEIjOkc3QLf4Hi X-Received: by 2002:a02:b718:: with SMTP id g24mr3919804jam.72.1627912209450; Mon, 02 Aug 2021 06:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912209; cv=none; d=google.com; s=arc-20160816; b=HLGWZ86wCKQriAIBqMyIUgoowZfsbmMz0j5WHpiEhzG9d1we+8sKpX4cgD0v91hSQ/ jrHIcfOzRSrJ7/Zg3LOmChaUcAoZxdKomdNdFXvt5Me+WPwBqU1VFAYkISXcOo2e/3G3 720lD/GP+6eeMaUBB493f7Hx94eBDyvLH4cwtOyA+oZJzLOznOg0ibbmvF8iLHGksnvW YT5bfVFH1Ki+CNGkZHK0TioyZWS5EbrdAnIuhN+DhkOYje6x6v0rrH/bPXgm+yHKoENK v78goxV+Nh0S2PeWVuwUCzikw8DswCjw4DfB93tcyYTafDwfqOFlBhc6saZfbyPUk5IY EzYw== 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=QugDfeJYERcr6kUhQbgsN6TVafIHBBsqYWNp9bKadeE=; b=U2F8zshkfrSsK6CM30DWRLNfFrHpV7upIvI1Bl8/tojy2MGa3UiwsplHr0ONV46p2K YT4GYSwX560Oj6AfViTt/fdDvGOz/nibjfgXJDV3mXsX17kWxNxjPzQDENJumxICvcHH QM/70It+6hHcS9OPASIe3FfWwg+fWlYAqAlMwjjSsoFW2fPJgX4UOgIV+G+9WkdpmgvM 2vf2F0SsX0VJc49purZE0e+2J9/leNANyOAoZJuNyYD25gCbMDj7z9+X2yrteyOKn3P4 K9JZGa+sJBmmus3SilsC9LtRTng7jEpA0xU3fp0Znw80rE8hJSx818zdaGCEIVL7Gb+d XH9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Uol6b1V+; 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 g1si12502130iok.92.2021.08.02.06.49.57; Mon, 02 Aug 2021 06:50:09 -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=Uol6b1V+; 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 S234193AbhHBNs1 (ORCPT + 99 others); Mon, 2 Aug 2021 09:48:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:56038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234083AbhHBNqk (ORCPT ); Mon, 2 Aug 2021 09:46:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0CAD860527; Mon, 2 Aug 2021 13:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627911991; bh=3q494ZTRD0FYNLe8FGVRRXJETCXL4zPyz71GQjS4XJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uol6b1V+7XBOOpF9Vaasnqajkz/eu+seODVSiWck0jF5BbdvSjqj20w+BDCvlrpjB BiigJaPTSzqXPW0B7fhqkg8Ih5eCmiWsl9AI3NRBsSzVFU1F1v88MTgzTGBhjBGUfY g1R/nOcxK+0l432eqAWwcIoybzAk4Y6sfKYqwgzE= 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 4.4 18/26] NIU: fix incorrect error return, missed in previous revert Date: Mon, 2 Aug 2021 15:44:28 +0200 Message-Id: <20210802134332.623517363@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134332.033552261@linuxfoundation.org> References: <20210802134332.033552261@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 @@ -8213,8 +8213,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; }