Received: by 10.192.165.156 with SMTP id m28csp700833imm; Wed, 11 Apr 2018 06:03:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+se9o2KQZF4i5GKuxwNFhEqSLRXiu94t2q2dKtUEQTJhT37NX6qrSxfpjBfaQuq/kfJhkt X-Received: by 2002:a17:902:6a85:: with SMTP id n5-v6mr5048280plk.313.1523451837722; Wed, 11 Apr 2018 06:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523451837; cv=none; d=google.com; s=arc-20160816; b=0x7ZXbEDi/AJV/A/6DEKzsUrG5vroBF0i/4ZxsZ5qEgBG1XNZljBskekPXWiDC5JzW 8amQcGGOZwoXCXNWMirQpr6u7kYcoRqiOpgV1DaVsS799OeKMooLtCzdRe3f1ba7khNV b3qm2NvrMw2b1rfVfq1KGFCytr9KEe4wnbX1NWpprGkh2gDKWrjO1JYqh/D47YW1E+kC CVdaq4rqyytYqj0pMThEADf51xMtBUNgbZ/Gs0SmVxQhnimFk10Xc5pSXRNShkAfqG8R Cxou8ADPSbOet1Ww5iCLGYQ7rsm9jmNuIQdsXw4Dkds5j/leZVzIH4PSdERh2ikxv0zW D5Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=Riu9AadutKqm55B+/hEO4ytEg9YUwEfLhFD8qLhtUgo=; b=aX6+Ez60groi7HDU1iD/T2C+YZYTlpmgjvpaH8rQPUwDpzbf5rsJ1DkcItxRVlBDFX NRDePZMEvkBwx/WBtlO6roZWAy+k4dSSBh0er+QK+BgLFuXCGbANYUVElnQ/5ITRmhDq aO7qlvTbCrk/wdps3J9R6TjeHcNl8UuFl9Krlj47kN/OKt7p6iDf7SQMH7Si7f/J9h1x mwtHymSO7UjiPJnA2FE1P5WyYX5OfkM85H6gNPN9+N9lj+LUY7BsEMHa6obCVIy8+9dG ElDF+ZI1fxr5356qI6LBn7K4u9ccqAKITcGaKqCNJyGZHfGRBZpauMIBoYtnB+ZIyjzg zWuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=JPpEyAdP; 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 v24si827627pff.274.2018.04.11.06.02.50; Wed, 11 Apr 2018 06:03:57 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=JPpEyAdP; 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 S1753549AbeDKM5n (ORCPT + 99 others); Wed, 11 Apr 2018 08:57:43 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:55654 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753219AbeDKM5l (ORCPT ); Wed, 11 Apr 2018 08:57:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Riu9AadutKqm55B+/hEO4ytEg9YUwEfLhFD8qLhtUgo=; b=JPpEyAdPSoSkrHIdydKjBWHwx6v6LR38U401qasDcOY+NM4IPMCt1gH/6fRr0loZzYT4QaCZfWWq/bardoZF42D7Sh+M6pVir40VFrrtv0U6lsC3nioLJsg5L7QRa7Xr2aCCgb6/64QqzoSkQK1bu0NUQrQPfGxIdpb9trGYPUE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1f6FJh-00025c-3o; Wed, 11 Apr 2018 14:57:37 +0200 Date: Wed, 11 Apr 2018 14:57:37 +0200 From: Andrew Lunn To: Phil Elwell Cc: Woojung Huh , Microchip Linux Driver Support , netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] lan78xx: Correctly indicate invalid OTP Message-ID: <20180411125737.GB6119@lunn.ch> References: <1523440757-127451-1-git-send-email-phil@raspberrypi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1523440757-127451-1-git-send-email-phil@raspberrypi.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 11, 2018 at 10:59:17AM +0100, Phil Elwell wrote: > 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. Hi Phil Do you know that the Fixes: tag should be for this? When did it break? Thanks Andrew