Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1643460pxy; Mon, 2 Aug 2021 06:57:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZ7M8WvJ6Od0a6ZNIFbshF6Pp3nMyPHURcGOwThE+ls0IumyLCxK5e3aY8RPTsjolp5cBd X-Received: by 2002:a05:6e02:54c:: with SMTP id i12mr1399824ils.103.1627912678775; Mon, 02 Aug 2021 06:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912678; cv=none; d=google.com; s=arc-20160816; b=GJ2QO+uFC6TtsS0QT3xPV0OZlvG4qCKTOF1EP3tR69FWv+yNpIn0d5uTFyBpL/POvF WD1AKR0IsM8jSjrIyeIwT/c5wjX03jP/8LLR4uUk4L+a2fH8ei0AsR+PPy33JyU9N8N2 Jqv9cHiSGSNMabWbU/YFrXF4RhBoVQx6kCSUe97jRVP6fyKWJVgUvUFdXqwCxatFizHB +Wudm1qQdQPIVo0/noANBQOgH/vubBPnC+vdFHFu4t4+gn5lqyAD6r/OsWvLS5Cl1iVO wkVLG5YgbrfiwlKafVbe5RHJQuwzBY8E83JiKc035msgiLAFQoDVD1BBqGqINZlwSzp9 C4ow== 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=bHdgKkrPQC9ASlcIliyoiONhhAKWcQ+rX/dVyWxPc4F50UgEOcyQO6nVMDfzhfKjOL Ia70a4ktmf1Q7hGjgUjI3OBmeaWV5ljSRVZqoeoSaVv9l11k3oQVJb2e1bpybbrS7PTA 1y4y4r2H0DiO7lL4vqkqrjtWY/KkS2TWOSqqwiXi4YMQCRytnRFagYV7gq7eiw0u1IB8 gW5/xkBBQoU0UqMV5VrrioAKQVQHUERcVBP8QLI4//E2qj9xRkQJmF2HB1URWY2XTRQ2 T/4DDnGvn4Ib7Etbf6738srHl3OBsS5okV6j/Xw2M9xUl/F2GJ/4kA4aTFuBDXqcIoSc +wqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EzzVsli6; 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 d21si12942115ioh.102.2021.08.02.06.57.47; Mon, 02 Aug 2021 06:57:58 -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=EzzVsli6; 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 S236175AbhHBN5P (ORCPT + 99 others); Mon, 2 Aug 2021 09:57:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:34138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235092AbhHBNvW (ORCPT ); Mon, 2 Aug 2021 09:51:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D10CC610A2; Mon, 2 Aug 2021 13:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912254; bh=kE9Bk9DFA1RgdtiMAimfsy3v2qOuPct73DWDjzSZdYw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EzzVsli69QYV6BimMGamFQAi+C+Hin/jHuqgYtpW4Xe3Q8QTLGvDH9H48mLS7tRH2 W1fapNmE0NmN1aZgSSFpBWPb0EPjmBkDk6e8kFb2Ikt7SWdurMpt3MGTCE/gupv741 oH8/moZvXlFIxSxpBZUGa4LGCG9bnp1nip5vfO4g= 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.4 17/40] NIU: fix incorrect error return, missed in previous revert Date: Mon, 2 Aug 2021 15:44:57 +0200 Message-Id: <20210802134335.942785105@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134335.408294521@linuxfoundation.org> References: <20210802134335.408294521@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; }