Received: by 10.192.165.156 with SMTP id m28csp808214imm; Wed, 11 Apr 2018 07:35:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx48sdWZyoVl8FyhZa6vbbFKLifIph2tTd5T+ZQU5RMazAW+jPeiiI07jkZ2+Ir7g/XBfWMs5 X-Received: by 2002:a17:902:274a:: with SMTP id j10-v6mr5296252plg.28.1523457333395; Wed, 11 Apr 2018 07:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523457333; cv=none; d=google.com; s=arc-20160816; b=lqwFdVJpR2LLWWFIww8b1BezUq3ok2//LLZZt6oWd8WoUHuc+ppeHnH7VoS+u3hqus UQXB7B7KEqK9bU+Mg8VWuVwL8aSgf9veB0P4eT/YsT4QjDEXVFJw/O+Uo5BeSU5etPVA SXmH+lITj9f+HUL6OyjWLGlkSUs3t4Dqw46E31XbJq71hATdEv8FdF32VoZAJFlO9eeP uOBn5sFRUrdZBBhPjBxDAspRwLr6LW2wufwUAGVtHp1I6ZdoKFJEj4h2FzWelEVS+rUS 80x+foec0lgRtpk+27l19o8vjm9G176XNxF4f57zqBtGsPEdh12TJmo+HqHqX5B3BELf K45w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=6PnQ+RCM6LnH52gA5lTEFf5hwHOK+UNcUrUpPsVC+FE=; b=Sxdpnqk+juSCeKDKjp7ptKN3+a/qunauPia088Qx/SW6k1KBngbbnMP3shQWNf+7Eb ZQcPRO57ygziOkvRDEcxsYF4HFeQdGMNqRmuGz3+NAy5sg6zvlRAIL8h0dN9xbQ4JHfA 5IvG0tnQCEdSu895A0Y0BD9iDsCNMI1IE+MkAfHQ6xd9Y9em63+zHhmCyURkgA0x/e2F sbBSGMIB7NXCibEl39YM3juQYhQzTL0f74vQUh8gEtLGh0cdUEPdvO/SW4rJ9eXF8IkS TO27tJvW4Jwv0w7CBX239mbnQkYvihg7qjE6slA4GwJX1+IGSkfFGUP6KiwCLCMOYrT1 zY8g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bf10-v6si1240099plb.417.2018.04.11.07.34.56; Wed, 11 Apr 2018 07:35:33 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753499AbeDKOba (ORCPT + 99 others); Wed, 11 Apr 2018 10:31:30 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:41218 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753405AbeDKOb2 (ORCPT ); Wed, 11 Apr 2018 10:31:28 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 0F5B913FC31D8; Wed, 11 Apr 2018 07:31:27 -0700 (PDT) Date: Wed, 11 Apr 2018 10:31:27 -0400 (EDT) Message-Id: <20180411.103127.1511048337167278763.davem@davemloft.net> To: phil@raspberrypi.org Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] lan78xx: Correctly indicate invalid OTP From: David Miller In-Reply-To: <1523440757-127451-1-git-send-email-phil@raspberrypi.org> References: <1523440757-127451-1-git-send-email-phil@raspberrypi.org> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 11 Apr 2018 07:31:28 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Phil Elwell Date: Wed, 11 Apr 2018 10:59:17 +0100 > lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP > content, but the value gets overwritten before it is returned and the > read goes ahead anyway. Make the read conditional as it should be > and preserve the error code. > > Signed-off-by: Phil Elwell Applied with appropriate Fixes: tag added, and queud up for -stable. Thanks.