Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1643346pxy; Mon, 2 Aug 2021 06:57:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeYUVbQKityz+Z65ob7x5xG5gGeTerlFgNSuIVwulnQZLut7H5e38tHtgVDL4WAr1ISbZm X-Received: by 2002:a50:954c:: with SMTP id v12mr19283181eda.313.1627912667396; Mon, 02 Aug 2021 06:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912667; cv=none; d=google.com; s=arc-20160816; b=fUx5tHSSBNEAr9HWzAtUogqUDz31bw0tMakWihNZxbzMyMFkFuckuxCMGHUQeox/8p vBhWDpjY0ITOdAACONESAtz35AloiVCsod70kjxncZsrTpicBNjiu65oiBCmWzIO1n3l edWI7fZrqBCg1iha6Kp6b3B+K/vpaMxIPZtDzBvwshJh9M4R3NxdOFduXSEcHbJ72H8X Iicdglc48rw4F6SxqcG/WZyWgVCvio4S67lMQesfSydaMmtEJbJRH9j8ILdsOU6zlazb ai9JrWMwdYGXnoiIY0NcrJBcOI40gqlfwomOTibIL/1AgQIqY9lXDCaXecrV4NsKz2Ii gHVQ== 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=rGYuq8isP+3FVe0+oFjeRcTXZ2Ym9i3NgyzMtLuvMZk=; b=jhHtmfiYsxEgG7/WrvS+Pv6mtd2seyWiC8zQbHeKl7HSsubGY8OA2U+XZ44LxNPf7I OeQtlc3pyAKgl4B3X46lM2e9G7e+V3JM4a1aDXA8addlbW8zHZG2tgBVYLP9my7JNMmu 0NtWKZ8IxPnG7RT1K8M9jBtZDmRNNMEYUNI4JBa1nonSpA+6Oj4kVXuEqBq64RBY613V KnfE6g6qeTLBZ4+zNgE+dIHX2FwcMS7cpLqIImGINKVdzROj5U69lQCTRrpFfSpNkVVZ m79cxB5UFazuixRuFX5tkhN1FLYpH8L9JkpjLPdk1QEWVyAwdpIRRJ/SnHJnfYKru8OF /g4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UFp7qucW; 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 n3si6741379edo.237.2021.08.02.06.57.24; Mon, 02 Aug 2021 06:57:47 -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=UFp7qucW; 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 S235609AbhHBNzx (ORCPT + 99 others); Mon, 2 Aug 2021 09:55:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:34462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234959AbhHBNud (ORCPT ); Mon, 2 Aug 2021 09:50:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5BE8961106; Mon, 2 Aug 2021 13:50:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912223; bh=Tg6mV7ogNQ7LAcwdRc+vZa5u7Bw+xscjw6gMRxGquT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UFp7qucWNhhFu7s08q4EIhI0vxJDXVne/9ETevkfHuJlREyKDcYNjbeizOMYGLvJp VXiOKru4wjtX5ZDyIkANcYciTcpiCMH5RRGcv6g68kBJkuOYtwP8j2LiEuXH60b3m8 m/ORDNn1pBRl1yuK+WsV3tBD/b0DD+Lv2d9Yv7pA= 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.19 13/30] NIU: fix incorrect error return, missed in previous revert Date: Mon, 2 Aug 2021 15:44:51 +0200 Message-Id: <20210802134334.505649075@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134334.081433902@linuxfoundation.org> References: <20210802134334.081433902@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 @@ -8192,8 +8192,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; }