Received: by 10.192.165.156 with SMTP id m28csp705162imm; Wed, 11 Apr 2018 06:07:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/1yci2FGfmHM7k5ra2R1gInT+yKV6Eh6DaAuJJgGAjCpiqb5p1I3ETQzQzUMnbu5m7YWqu X-Received: by 10.98.242.6 with SMTP id m6mr4007188pfh.170.1523452022120; Wed, 11 Apr 2018 06:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523452022; cv=none; d=google.com; s=arc-20160816; b=a2fQ47E3rCPs5hcNvBqxujzSiVPchokDXH91w/VE6hmhPDTVUePT8tCQz/05Ms9uta RNJFwl+Rb/gxAk1f0b6VTSIaZ3E6dohCCS+fmnNrFMt/jc60QmnNPNAUI/mRxbQaZlDG 9sZqFqnLMQK8SVsSyYXkHOCTbupHcS/yWxPgaBzuzUvyH2Qvdb77x3UCTb6eWoD37V8f aYUsfV6rjsL6EICZ82lWQiLOA9mFIqUK76QMx6fAxb4QbhrQ3pJqLbmAzlzDv540HQH9 vSG/29aA/OGGZc9/xSJ1cOiRjqtyjLKEh3GLGu5o9iYVjPEjLDZNlJgH2KYlL+gn7Iog uo/Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :dkim-signature:arc-authentication-results; bh=t+uFS0TqnzQgeLL+rJ6ZliXjAIda18weIHReK2uYCs8=; b=OsvgzhpOyFjt5zm6cPAppmf/Kp/M2VUXDomzexdfJSJchDeY+SxjeSfrsakOZY6W28 MC4ZLj6cWZUreSFhDaP10xGd5ucajEN6MKyai4V5RUEer0+qHP6jJ3lTvrCuf/ewRivD +Sh/8A12h9XrFRzEQisxqX5lgSc37A+N0OBmNWwVz0ZcRvEMFhnJ7zqS8O5Lv/Im/lUc XYs3yE9np1lgE/PNRaJaJWIbESML2AojLsp/fug0WBaP/SjEBt2+VOxEoLwyjNrT07Sk p+/aL202S38A37IjgrM+pVObi/DFUvv/fk1aZM4SNzfb2+ys03cORg8Q3htyeKsapZZn DmVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@raspberrypi.org header.s=pp header.b=N0BhAEii; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=mvgzkp7R; 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 o10si749466pgq.432.2018.04.11.06.06.23; Wed, 11 Apr 2018 06:07:02 -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=fail header.i=@raspberrypi.org header.s=pp header.b=N0BhAEii; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=mvgzkp7R; 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 S1753331AbeDKNDk (ORCPT + 99 others); Wed, 11 Apr 2018 09:03:40 -0400 Received: from mx08-00252a01.pphosted.com ([91.207.212.211]:59270 "EHLO mx08-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753035AbeDKNDi (ORCPT ); Wed, 11 Apr 2018 09:03:38 -0400 Received: from pps.filterd (m0102629.ppops.net [127.0.0.1]) by mx08-00252a01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3BD3apb019567 for ; Wed, 11 Apr 2018 14:03:37 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp; bh=t+uFS0TqnzQgeLL+rJ6ZliXjAIda18weIHReK2uYCs8=; b=N0BhAEiiC4qYSrcSzXyNaRlvxJBk1fkRtyqeuKxlZGU+ZXAzQTQVRZb/aPdzJYKcV97X hsbzfgPyvLLiJyPuOC+3buKDn/u3NHIjxm3j1bI75MgDB6zd+Xcv74adGDhRqlgUVMDl PQLsDteEUv887JdRpK9o95/1drRpRyV7I5XaAjfmbtETcdMDIO6/gMHfa8uS/MuDXOiF T9d/Nm7g6QqYsv52Q4/lmoxvgsLgPsNgNssPuTaEnRdp3D2LvjVicVeEVlWLf2k+mEaM bOKCW03pX1GxKzbDy2oKGuWvyUJZOf68NyDViAlRTD4JbLm7GxPTw3+wrB+XEyrU/XGd SA== Received: from mail-wr0-f198.google.com (mail-wr0-f198.google.com [209.85.128.198]) by mx08-00252a01.pphosted.com with ESMTP id 2h6trdt1mg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Wed, 11 Apr 2018 14:03:37 +0100 Received: by mail-wr0-f198.google.com with SMTP id k27so1009986wre.23 for ; Wed, 11 Apr 2018 06:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi-org.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=t+uFS0TqnzQgeLL+rJ6ZliXjAIda18weIHReK2uYCs8=; b=mvgzkp7RzMpnwmjWfAEa6tiCoWdC4pmujsk01Z92bD5pg4TofU2L2/KRvTcnu00lVf HRbOPIPWb1hdKQQORYnFcL75MdCDrjsl0zLckA1D/CWe5unuQG0s0RaEWjc/XDHVb4Wm OE0YaJJ6eRhFQYk2HryFjJ8nYqya7Q9XAlmA4CgDKZU6xd0LsKrL3vt9THnHP2oxC7Re DA/D8hulXgYUAoWcvpCZrcXoFhxe4nM02QOcoHCSZhsuY4WCi21yNdrZudOP1Sbdd3H/ TszLxMkVTQ/rxIZDeHafAjQE6TMGpnda4hd1n8AkVABvCTyJLJwH8+moJHCWpJMPfO6Z Wh2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=t+uFS0TqnzQgeLL+rJ6ZliXjAIda18weIHReK2uYCs8=; b=YjCXL0VA6awjF5YbfnzzO0/51rK3/mVS37noS+e5QirgiXoKD33QilLvTnvYB4e8c8 J1Tt44/kl9SJEwWRd0AzAY168o1FHLSx/5hVm7niZDE3lbREbMPttRRTaKfAbycU9hSg 6dR90FP4gk9QHWi13syrmYbrXGq8ywN64alLIQZB+3UHP1je1yQAPtXSMDt13UWD61+c SYaENla2JK7ddX4cBozdLS8JcIITM9u8bGMHExGg+yWLBxHAcZRI+KLjqvgVqSIhRBKo pXTYDt3cxyvf6C1M7mJyIaO+t7k6/tOHv3S7kT9Ddp5o6JxblXPdYNP9Hx4D+luJHrIO wghQ== X-Gm-Message-State: ALQs6tAiXtTdQYKmSKE68YZZNKZIlKgjo+PIuKP3ih5go8r+YqjNsjnJ DsvH2PWzdoW8Xx2xzkYIgN7d+NmjZN/RfhXWCFeEUjEawyZpD+5PP+tQ/68p2B5UxNXUKOhuprq 6r6sf125PniFUo67AsXjAlWYs X-Received: by 10.28.236.204 with SMTP id h73mr2436600wmi.77.1523451816006; Wed, 11 Apr 2018 06:03:36 -0700 (PDT) X-Received: by 10.28.236.204 with SMTP id h73mr2436584wmi.77.1523451815725; Wed, 11 Apr 2018 06:03:35 -0700 (PDT) Received: from ?IPv6:2a00:2381:fdf7:14:803d:a195:ce56:b202? ([2a00:2381:fdf7:14:803d:a195:ce56:b202]) by smtp.gmail.com with ESMTPSA id 185sm1747804wmj.46.2018.04.11.06.03.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Apr 2018 06:03:34 -0700 (PDT) Subject: Re: [PATCH] lan78xx: Correctly indicate invalid OTP To: Andrew Lunn Cc: Woojung Huh , Microchip Linux Driver Support , netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <1523440757-127451-1-git-send-email-phil@raspberrypi.org> <20180411125737.GB6119@lunn.ch> From: Phil Elwell Message-ID: <6615a0eb-a0f4-d964-bab7-e2105b589f3d@raspberrypi.org> Date: Wed, 11 Apr 2018 14:03:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180411125737.GB6119@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-11_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew. On 11/04/2018 13:57, Andrew Lunn wrote: > 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? It's been broken since day 1, so: Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")