From patchwork Wed Dec 13 01:59:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 121708 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4897518qgn; Tue, 12 Dec 2017 18:15:49 -0800 (PST) X-Google-Smtp-Source: ACJfBotOEEi2zn859k9CggHxUYpu/DDi2PIv8VvvlpkW0ik+1XvOcWbvbOLkvKCl+/2v+0oRMTS9 X-Received: by 10.98.158.89 with SMTP id s86mr644094pfd.216.1513131349569; Tue, 12 Dec 2017 18:15:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513131349; cv=none; d=google.com; s=arc-20160816; b=qlorqj8+yNRzEJOs3b1Syn/KT0QGSA5GmkvuQlqL0xq20GfTKorlgh5yVNYnkTTAaF +WaG0zgnNSfON1OyjT2gs4npAB1ruyg8vvDrPJlPzxA6zfeTV70N33gedHenhGpK7ZTf +L/kGV+Wh/KwLLoQfZmduzounQigOIJLRjNDuCP6BBr8hGaLo1bQwQeSJybitlHOHC83 mmiACZw99DuN2C6ixMZXVUOyV8m6goBvz8t7tqbMHPStmV38y8oZwuPSZ3VASDCOQOG5 iAJFf+7es2fC5QBUHr2fWKMXRl5REzt++OCe7w1UtdLecD+nPKk4UCXjtuoCzulmzz5d FtjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=C/MeMvi0S7OnZ2SUC02AeTf/bG2hf6L60l32tFtyQUI=; b=R0Rh9S2F37Lru/8ztVpcpw3+1JvWxh4nHuVA6a91UxOfnqEndKivmqYel9PUMGN+Kr 5I84S5tV+Qk/qUBc3uxbl1F2vXz269D4TuSpms0sX75CD8SItqfwFc9tCZ4/bk4s6tQc Od/yXJ8PjZmnik7bQVY0BhZKNarowRQ1E6BkFlpwy0PodAOLveYJL1PpyygDriun8NDo yfO5TFVluWcH0A49R5ZackcAEWpzNGl5CgG0D+rjfrrC4sVPDkP3pRriUiF4fSXQoBdf XISBcqWsDVl5QZ9JotdD+UEZWRGjYgEwALWpKUxu7akoX/Tl7LVSaw2axd/DW8mdF+qQ wwxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=HCcLcUps; dkim=fail header.i=@verizon.com header.s=corp header.b=Y/dx/jod; dkim=fail header.i=@verizon.com header.s=corp header.b=i/okyBoI; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si446259plr.112.2017.12.12.18.15.49; Tue, 12 Dec 2017 18:15:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=@verizon.com header.s=corp header.b=HCcLcUps; dkim=fail header.i=@verizon.com header.s=corp header.b=Y/dx/jod; dkim=fail header.i=@verizon.com header.s=corp header.b=i/okyBoI; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753158AbdLMCPr (ORCPT + 10 others); Tue, 12 Dec 2017 21:15:47 -0500 Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:59672 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753711AbdLMCBH (ORCPT ); Tue, 12 Dec 2017 21:01:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130467; x=1544666467; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=URfCD1FNCw8xQX6gkxUIOCHwCxSAM9dG2x088SxWLb8=; b=HCcLcUpsKKfJDDf0jpkF4s/CQ15TMOagPZK5bt9KO56IYN8PYCyxN/iI hgtB/u951znmtAGDBrwkWokMKsjYOOqxqbAfzO7C2xHi8AW+O8zQtJrwY /Bz8kwYg5Os9vSRw5fzYvqKRyIhpr1MqIHzKSwsOU4Psg99ryzlOhI+ca Q=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe03.verizonbusiness.com with ESMTP; 13 Dec 2017 02:01:03 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 02:00:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130459; x=1544666459; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=URfCD1FNCw8xQX6gkxUIOCHwCxSAM9dG2x088SxWLb8=; b=Y/dx/jod59jxIV8IUU4ZsENN1uPmd6s3XZAnjWBjKiF7lStSn8P6balK gPXQl5Ie2a/CKwvKHfwbBW4ocbDEoq0iFKI0fIx3j4QSQbCbKN/CgrXEp CYMGASGA1Ft1cw9ZBF7Fi0QnQXHa21Zd0K4+IPA278ZeqmC/KwxVA9q5j E=; Received: from surveyor.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.83]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 21:00:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130458; x=1544666458; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=URfCD1FNCw8xQX6gkxUIOCHwCxSAM9dG2x088SxWLb8=; b=i/okyBoIpder9Fk9QTk5svx/VeqCDoyusw+gdeM81P+XItucdm44HPPK zJAdsLA/f77/iQwxLgZOrAFeC0+wN1SxcF/RKMN3TcZkorfcfnQpNTGaZ kpkYp5HBGgMpfJLaEpe2U9A0ZY6BVdjCQ/ITWXm/oGnZJjcsATszuBBNK k=; From: alexander.levin@verizon.com Cc: Roger Quadros , Felipe Balbi , alexander.levin@verizon.com X-Host: surveyor.tdc.vzwcorp.com Received: from ohtwi1exh002.uswin.ad.vzwcorp.com ([10.144.218.44]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 02:00:58 +0000 Received: from tbwexch02apd.uswin.ad.vzwcorp.com (153.114.162.26) by OHTWI1EXH002.uswin.ad.vzwcorp.com (10.144.218.44) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 21:00:58 -0500 Received: from OMZP1LUMXCA15.uswin.ad.vzwcorp.com (144.8.22.190) by tbwexch02apd.uswin.ad.vzwcorp.com (153.114.162.26) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 21:00:58 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA15.uswin.ad.vzwcorp.com (144.8.22.190) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:00:57 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 12 Dec 2017 20:00:57 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 3.18 06/40] usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed Thread-Topic: [PATCH AUTOSEL for 3.18 06/40] usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed Thread-Index: AQHTc7X4diAH0Ix2i0akCtFyQNiSTA== Date: Wed, 13 Dec 2017 01:59:12 +0000 Message-ID: <20171213015905.7059-6-alexander.levin@verizon.com> References: <20171213015905.7059-1-alexander.levin@verizon.com> In-Reply-To: <20171213015905.7059-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Roger Quadros [ Upstream commit 16bb05d98c904a4f6c5ce7e2d992299f794acbf2 ] As per USB3.0 Specification "Table 9-20. Standard Endpoint Descriptor", for interrupt and isochronous endpoints, wMaxPacketSize must be set to 1024 if the endpoint defines bMaxBurst to be greater than zero. Reviewed-by: Laurent Pinchart Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/gadget/function/f_uvc.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.11.0 diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c index f4a0b25d1810..5e679fec4e33 100644 --- a/drivers/usb/gadget/function/f_uvc.c +++ b/drivers/usb/gadget/function/f_uvc.c @@ -612,6 +612,14 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f) opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); opts->streaming_maxburst = min(opts->streaming_maxburst, 15U); + /* For SS, wMaxPacketSize has to be 1024 if bMaxBurst is not 0 */ + if (opts->streaming_maxburst && + (opts->streaming_maxpacket % 1024) != 0) { + opts->streaming_maxpacket = roundup(opts->streaming_maxpacket, 1024); + INFO(cdev, "overriding streaming_maxpacket to %d\n", + opts->streaming_maxpacket); + } + /* Fill in the FS/HS/SS Video Streaming specific descriptors from the * module parameters. * From patchwork Wed Dec 13 01:59:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 121707 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4895906qgn; Tue, 12 Dec 2017 18:13:41 -0800 (PST) X-Google-Smtp-Source: ACJfBov/fptYCAnx8oHgOYtJWq1e3OGqCoqObd3oaevaMuuFCeH31PLQxuTsLelCaphYoPdIAiBD X-Received: by 10.99.168.67 with SMTP id i3mr3857612pgp.330.1513131221003; Tue, 12 Dec 2017 18:13:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513131220; cv=none; d=google.com; s=arc-20160816; b=S0s1lRBNwjWfQxCP5mq+8qxJzOEgvctNPL5aafKkWYTgiYKo7kYNPU9sy3MhaK4j46 +eNMhQSO10yv5I5kAjdI4D3rqHeChMB6xyKufBeA3dZgNcLlSp4PbsFjgmOQVj/MatT4 UL93Afj8bWNKXiUHs4+vN2NvnY7JIVnfmO4/YaPkr3tY6HX4O125hzWSOoyUR3pO7Q8Q gSWP5Kf1bboFjeLAWnaMjVieSMkb/1tK7mLq2MzDOr7KuXRWGss4pjzR/bFTLjMQcBzf xPuuAiVfHDLVx5WZXhmiVfjfmd9eor+ps/qU9jxDgP9wW94uxCSvm7RXNjMnCI2pJxXJ W1Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=VKcUfz1ia4idFefQJWoqYNcdD2GkcOFdjbdLY19FhQU=; b=c1p55WpOx81uOqKE74m75lBvYI7VD5An7vRhNmb9SCw5EUjH18+KKs1Fi0VFNvUAqR ePbjezMQ+mlIDyp2Xfy3tiQtliz/XjLyDqcgki34qWTkePMUbZlC9r73aQcKXmxxcMpa cIpM5mmtJtNoSCmEv8Bs825RbmiTySv4Us7Fmc7Jxpwy+LmotgZUD31vzPWDfnTnfWB7 8m1IA0sLqSwHTzPPsVyxyLcKTs1ipbwFdlnRU7Outyo8rU2NUQE3ndg+0n9FrR/TDp9R rh+fP4VTfhQtBjJFMAK1BsrJkZvqb/Mw3cEtpidV6js0wypam2fPjLiSArJa9MSiVHFg PcbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=MNMZJQj7; dkim=fail header.i=@verizon.com header.s=corp header.b=hCky0M5u; dkim=fail header.i=@verizon.com header.s=corp header.b=TBUGmkDj; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n59si432706plb.673.2017.12.12.18.13.40; Tue, 12 Dec 2017 18:13:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=@verizon.com header.s=corp header.b=MNMZJQj7; dkim=fail header.i=@verizon.com header.s=corp header.b=hCky0M5u; dkim=fail header.i=@verizon.com header.s=corp header.b=TBUGmkDj; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753575AbdLMCNi (ORCPT + 10 others); Tue, 12 Dec 2017 21:13:38 -0500 Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:39443 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753723AbdLMCBK (ORCPT ); Tue, 12 Dec 2017 21:01:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130469; x=1544666469; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=heb6R2cmPQc+YGUc/+76JrfPTAdHAoRZI990hDokSHs=; b=MNMZJQj7Ti4k0L6haQgl9p+biFJ8S7BK5pEomuVA/dzWveJzrvCaXWhE 5UwYgbynl5dwq1w3Ti8lhfJmk+zbre3w13exBRy82e5cnFHza5ExbdrZR WErQMwzSe3cisH0KFKlL5Wqb/AjKEGG9kn3lA09u5/DBtjpgbdJ8MUJ52 8=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe03.verizonbusiness.com with ESMTP; 13 Dec 2017 02:01:04 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 02:01:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130463; x=1544666463; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=heb6R2cmPQc+YGUc/+76JrfPTAdHAoRZI990hDokSHs=; b=hCky0M5u7sXWMnRVh3xdo5FpCGw5wKCWvRz3SwXcRctQYPGpu/1N/UAe 2ghnCxDILZ5+KaCnGUcbtCfZriNV4ZClc8pa44HxuyFfHyZykfg6mhCmm LZXquqLsnILP0TY9+kdewuoU5UTIdb8Iu1Y05+k+PpQnGICnJ/Jgfj3OF Y=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 21:01:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130463; x=1544666463; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=heb6R2cmPQc+YGUc/+76JrfPTAdHAoRZI990hDokSHs=; b=TBUGmkDjca+VwByxUtK08+C6KRTLv2X6QPZQA+lJ+pDUf39ruWnNNAeq YxJYQPdnI/cU1+Ki9s4Cptnor0snptJkaB/Tnhu90XlVD+R88Ii7nOWLg I460xkxCVwsJQnHpHl2nbpRcwSTAbX2+kvjmTNgB9QopDbaEloITDpKX3 A=; From: alexander.levin@verizon.com Cc: Arnd Bergmann , Guenter Roeck , alexander.levin@verizon.com X-Host: mariner.tdc.vzwcorp.com Received: from ohtwi1exh003.uswin.ad.vzwcorp.com ([10.144.218.45]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 02:01:03 +0000 Received: from tbwexch15apd.uswin.ad.vzwcorp.com (153.114.162.39) by OHTWI1EXH003.uswin.ad.vzwcorp.com (10.144.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 21:01:03 -0500 Received: from OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) by tbwexch15apd.uswin.ad.vzwcorp.com (153.114.162.39) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 21:01:02 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:01:01 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 12 Dec 2017 20:01:01 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 3.18 13/40] hwmon: (asus_atk0110) fix uninitialized data access Thread-Topic: [PATCH AUTOSEL for 3.18 13/40] hwmon: (asus_atk0110) fix uninitialized data access Thread-Index: AQHTc7X5naq9eIQP1kC1GWlHinjn4A== Date: Wed, 13 Dec 2017 01:59:14 +0000 Message-ID: <20171213015905.7059-13-alexander.levin@verizon.com> References: <20171213015905.7059-1-alexander.levin@verizon.com> In-Reply-To: <20171213015905.7059-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit a2125d02443e9a4e68bcfd9f8004fa23239e8329 ] The latest gcc-7 snapshot adds a warning to point out that when atk_read_value_old or atk_read_value_new fails, we copy uninitialized data into sensor->cached_value: drivers/hwmon/asus_atk0110.c: In function 'atk_input_show': drivers/hwmon/asus_atk0110.c:651:26: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized] Adding an error check avoids this. All versions of the driver are affected. Fixes: 2c03d07ad54d ("hwmon: Add Asus ATK0110 support") Signed-off-by: Arnd Bergmann Reviewed-by: Luca Tettamanti Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/asus_atk0110.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.11.0 diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index cccef87963e0..975c43d446f8 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c @@ -646,6 +646,9 @@ static int atk_read_value(struct atk_sensor_data *sensor, u64 *value) else err = atk_read_value_new(sensor, value); + if (err) + return err; + sensor->is_valid = true; sensor->last_updated = jiffies; sensor->cached_value = *value; From patchwork Wed Dec 13 01:59:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 121703 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4886254qgn; Tue, 12 Dec 2017 18:02:15 -0800 (PST) X-Google-Smtp-Source: ACJfBotv9nQW6k0VMXQqFI+TPdKZVc3Kfjq08Iw7laEYiyJppr2qGZnsFaHsAiaRxtkhLa+2boEu X-Received: by 10.84.131.227 with SMTP id d90mr4134241pld.117.1513130535295; Tue, 12 Dec 2017 18:02:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513130535; cv=none; d=google.com; s=arc-20160816; b=GvFI6sSzDeiIkdVESXaTCzq9x0mHiCIlIfL7Rv+V3ZA4cInrOZeROLQaJwt5WOamLX wXUhIfGu6QPHkxOcVLBkIG3JjZSD4+n5exkazLSvSrtou+a8tGZC+ktmIwsI639jVvMu L60a0xh5BO/lRxvOwdUWo4sFAdMeYlFJ9TYty14rdok3fNjsRnLAeoF0LsmkpH5mBCqb 3jFdQoZog52Dy2UEpUDD9V4Ttpbpx0X+koTd1RKUXE4KYTGWk+cwuee0xgkvF/Ylxp0r SZ4wjjzE3OZWa4AwKV1vWWA2+fd0wUiR7SGe9K+EbknDeT8J3ySXjhoaHurgBu8a4f4W ngMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=BX5O1kCtgMUSinHmH6Wo09giKmsRd/3yspP1gxRubX4=; b=HRy4x6M6Vjlv7lNN6QSS1FfzOA80wmTbXyCwJXgCGZFSW3JgQzdE0hPHzTAW388QCm b0G6bB9oLyB2lK59W1Cz6SdgfItfXhEw/WJS04GVjYx3c71CBRCnGCOAewgkj+CqkUmZ fuQDwEDUYTQsSF5EOjoYrdsU0RMkOmnggHqQz2ootywB46NNDVAY7+GBcILzi9C2znYQ melG6TvLGbGACDHkqdOqyH2Lc2eh3HAxNnM+oRxvBXoWjymhvoZ3m2fOT5kZspr7D1pz WCzSRtU5xxfCR9DTRn2ORwk/G8ie5/gX2qzb2I6N2wXc98wOay2mD3C2jvH/FqZNw3Al ZsJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=fkYpZU/i; dkim=fail header.i=@verizon.com header.s=corp header.b=IFokESrV; dkim=fail header.i=@verizon.com header.s=corp header.b=NHZznkjs; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si402433pgn.123.2017.12.12.18.02.15; Tue, 12 Dec 2017 18:02:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=@verizon.com header.s=corp header.b=fkYpZU/i; dkim=fail header.i=@verizon.com header.s=corp header.b=IFokESrV; dkim=fail header.i=@verizon.com header.s=corp header.b=NHZznkjs; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753602AbdLMCCJ (ORCPT + 10 others); Tue, 12 Dec 2017 21:02:09 -0500 Received: from omzsmtpe02.verizonbusiness.com ([199.249.25.209]:47774 "EHLO omzsmtpe02.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753861AbdLMCCA (ORCPT ); Tue, 12 Dec 2017 21:02:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130520; x=1544666520; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=fkYpZU/ijEaQueGT0wAUGI9R08L3k29mzoUztA/HRzI3FaJloajikj28 3I7bFnmn219B6yG3Vap70PXN1LHMabR+Det/s06piO2ytRURGL+zlqhuj iUxmw5qmz5Fvd/zQ4/ip0AbFjuoNCnq83eY3/HbTI5OLTAnmVz3zrfNZB A=; Received: from unknown (HELO fldsmtpi02.verizon.com) ([166.68.71.144]) by omzsmtpe02.verizonbusiness.com with ESMTP; 13 Dec 2017 02:01:56 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi02.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 02:01:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130499; x=1544666499; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=IFokESrV6ny0lLo9ELPatGPr8ozT6Nl2fmQ0Ok56eUE3DJukfR5z7CCo Ib4yqa5Ts8W8JahskVKOL4vEDCoCTOc8yyUS7+t70UJcmX4/Pe0vjJgEV DmCakPja81tJxaPDighcUNfOA9SUZ+nOLTe13BjIZKQhy/22yd+kLI04Q 4=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 21:01:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130499; x=1544666499; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=NHZznkjsHoYR3DpNdcFyDTaNvzymUT2v5p0l/IegOSy1Zx3TujtOiJDr dHg3EzwwspyJZ17QF5rGnnunVQsR5lxV3YSvYPd5sgaXirnpNT+4Ws9sQ w/02uTOOcpt6gEwsWZDaYtaRaguq5VZBtjw+98LtjPdQcL15SbkUJIQuO U=; From: alexander.levin@verizon.com Cc: Arnd Bergmann , "David S . Miller" , alexander.levin@verizon.com X-Host: mariner.tdc.vzwcorp.com Received: from ohtwi1exh002.uswin.ad.vzwcorp.com ([10.144.218.44]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 02:01:39 +0000 Received: from tbwexch09apd.uswin.ad.vzwcorp.com (153.114.162.33) by OHTWI1EXH002.uswin.ad.vzwcorp.com (10.144.218.44) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 21:01:39 -0500 Received: from OMZP1LUMXCA18.uswin.ad.vzwcorp.com (144.8.22.196) by tbwexch09apd.uswin.ad.vzwcorp.com (153.114.162.33) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 21:01:38 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA18.uswin.ad.vzwcorp.com (144.8.22.196) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:01:38 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 12 Dec 2017 20:01:38 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 3.18 23/40] isdn: kcapi: avoid uninitialized data Thread-Topic: [PATCH AUTOSEL for 3.18 23/40] isdn: kcapi: avoid uninitialized data Thread-Index: AQHTc7X7HEoVg8n//0quelW690uYTg== Date: Wed, 13 Dec 2017 01:59:16 +0000 Message-ID: <20171213015905.7059-23-alexander.levin@verizon.com> References: <20171213015905.7059-1-alexander.levin@verizon.com> In-Reply-To: <20171213015905.7059-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit af109a2cf6a9a6271fa420ae2d64d72d86c92b7d ] gcc-7 points out that the AVMB1_ADDCARD ioctl results in an unintialized value ending up in the cardnr parameter: drivers/isdn/capi/kcapi.c: In function 'old_capi_manufacturer': drivers/isdn/capi/kcapi.c:1042:24: error: 'cdef.cardnr' may be used uninitialized in this function [-Werror=maybe-uninitialized] cparams.cardnr = cdef.cardnr; This has been broken since before the start of the git history, so either the value is not used for anything important, or the ioctl command doesn't get called in practice. Setting the cardnr to zero avoids the warning and makes sure we have consistent behavior. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/isdn/capi/kcapi.c | 1 + 1 file changed, 1 insertion(+) -- 2.11.0 diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 823f6985b260..dd7e38ac29bd 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c @@ -1032,6 +1032,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data) sizeof(avmb1_carddef)))) return -EFAULT; cdef.cardtype = AVM_CARDTYPE_B1; + cdef.cardnr = 0; } else { if ((retval = copy_from_user(&cdef, data, sizeof(avmb1_extcarddef)))) From patchwork Wed Dec 13 01:59:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 121704 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4888706qgn; Tue, 12 Dec 2017 18:05:04 -0800 (PST) X-Google-Smtp-Source: ACJfBot5UnzdBX0ZQosBd9+9rK/U82QW7hUhFUJpb21PCyCkzI4GcIDEzHmiptEN61CKXaplKPB5 X-Received: by 10.84.229.79 with SMTP id d15mr4149487pln.397.1513130704428; Tue, 12 Dec 2017 18:05:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513130704; cv=none; d=google.com; s=arc-20160816; b=jINL5wo+79FRgnAwGwwnN25J/WYG7gbiHZxhMirFIjJ+avKhg8cruTScMGzCKU0jVu 6382bx3CaBk2ej1T2YVlWS+T1R/s/vC01mWoPL05f4bvj8J4rR+BQITCcZ8nHHSaRVGc aZImcbmkYy5LxtFDgzBpdym8JbslDGkpP5v16oaJaftlt2TtMOyoa9OdGytmzQcuBQfH NmywTiF40m35LHyH+hNHtayiSm/J0WF8H1ZJBob8ow9/HE7H6Z48rJUQ0yHp12CMUGCN gcyyCXFsvCeOQa4QLjywOMO7yGzrIyWffjW7REr3h5lSwK6n4mg0QI9Br1AbZwtf9tkD 2DqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=Qb0BCNEfVwTX4hfuZ7y7J7vaU8/cmekcVYMIV3Axgvk=; b=EAXjub0PO/9ZVp1D6ca3RXtQFK8/tEy8C8VnZYOmMSYzzWBBnxB9CBYL75M12U5Q4V NeLk7QAo3NEVksxQAYMELbsmRppYTQVIcwUxhEBvD5MVG8kOg/fCq3f76X31Hl8fbuMo QIe9jAs5U52eGjG+IZdzyroDDl70E9sWgVbdGZ1GskWYnoxjmCVg9MLe5YvQriLtjmN3 sJ2UUHEiRcS0Op9QBxQv/+NIhE7zS0g9tpr+VKh8lsFS1/HL2/Y9scNertFwO725/kK8 ze0kWw/+P+rmxs0DO3UoAcc0v1Nunz5HKQ+rkhb9TR5vtuxN1JkfeSFCgci0Nq0Jd9AY iH5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=oXewp6R1; dkim=fail header.i=@verizon.com header.s=corp header.b=iAE8mGUX; dkim=fail header.i=@verizon.com header.s=corp header.b=j1RTPdoU; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f28si392670pgn.758.2017.12.12.18.05.04; Tue, 12 Dec 2017 18:05:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=@verizon.com header.s=corp header.b=oXewp6R1; dkim=fail header.i=@verizon.com header.s=corp header.b=iAE8mGUX; dkim=fail header.i=@verizon.com header.s=corp header.b=j1RTPdoU; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753006AbdLMCFD (ORCPT + 10 others); Tue, 12 Dec 2017 21:05:03 -0500 Received: from omzsmtpe02.verizonbusiness.com ([199.249.25.209]:4918 "EHLO omzsmtpe02.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752279AbdLMCCo (ORCPT ); Tue, 12 Dec 2017 21:02:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130564; x=1544666564; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=/9ivT2lsrWj7y04nE9tF10WGh3x/tZ6G7iCTJD+pPX0=; b=oXewp6R13k6G3vM+Oa+fFJ4gdKjjA0dVmuP6eOk2e3wvIn5Jvmfidtv5 IPvk23tJWWdJnAnAGybZoZJwd3Sfh65QimNmTUlJZULA87O3Hgw+FtN47 x/+1LDyzpG4F9qdJTYsxxfuZv6ppIDqA4rucH35IEdes60L8L08TB0Qkv 8=; Received: from unknown (HELO fldsmtpi03.verizon.com) ([166.68.71.145]) by omzsmtpe02.verizonbusiness.com with ESMTP; 13 Dec 2017 02:02:43 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi03.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 02:01:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130528; x=1544666528; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=/9ivT2lsrWj7y04nE9tF10WGh3x/tZ6G7iCTJD+pPX0=; b=iAE8mGUXJ78KGoHHx6+3d4PTywMWR7x13cOvY4o4dwBUt4Z5QUYA0LTU G+l3KXz4JE2EjgCiHUnkZQ4+WInraSQWYHHLbhAwqpMNv8rV+Z1ed4Xa/ zCnk1NVUPuiyxTytvR55cJ9OD1Pu1BHgiGjIOi4K8zS6O32p9lsXwNZZO w=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 21:01:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130503; x=1544666503; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=/9ivT2lsrWj7y04nE9tF10WGh3x/tZ6G7iCTJD+pPX0=; b=j1RTPdoU82T9qprci+2Viqz/8dhQUkd9S6oglOr5ZiKc3NG1P0kEgCwc C8f9FTjCKvpO9p+2RomqlJ2nobGoCfQCVm+R7CzZk2DTG8FyVtUdJVixW RB9vz5xumWcayvZV2dfRrHhueCL3xB/+LP3VUH0AB/ZnVQS4pf08JXwzD c=; From: alexander.levin@verizon.com Cc: Dan Murphy , "David S . Miller" , alexander.levin@verizon.com X-Host: mariner.tdc.vzwcorp.com Received: from ohtwi1exh001.uswin.ad.vzwcorp.com ([10.144.218.43]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 02:01:43 +0000 Received: from tbwexch16apd.uswin.ad.vzwcorp.com (153.114.162.40) by OHTWI1EXH001.uswin.ad.vzwcorp.com (10.144.218.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 21:01:43 -0500 Received: from OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) by tbwexch16apd.uswin.ad.vzwcorp.com (153.114.162.40) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 21:01:42 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA13.uswin.ad.vzwcorp.com (144.8.22.188) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:01:41 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 12 Dec 2017 20:01:41 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 3.18 29/40] net: phy: at803x: Change error to EINVAL for invalid MAC Thread-Topic: [PATCH AUTOSEL for 3.18 29/40] net: phy: at803x: Change error to EINVAL for invalid MAC Thread-Index: AQHTc7X81Rs/lXD3oEiblTpsvUDrVQ== Date: Wed, 13 Dec 2017 01:59:18 +0000 Message-ID: <20171213015905.7059-29-alexander.levin@verizon.com> References: <20171213015905.7059-1-alexander.levin@verizon.com> In-Reply-To: <20171213015905.7059-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dan Murphy [ Upstream commit fc7556877d1748ac00958822a0a3bba1d4bd9e0d ] Change the return error code to EINVAL if the MAC address is not valid in the set_wol function. Signed-off-by: Dan Murphy Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/phy/at803x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index fdc1b418fa6a..5012708271ca 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -105,7 +105,7 @@ static int at803x_set_wol(struct phy_device *phydev, mac = (const u8 *) ndev->dev_addr; if (!is_valid_ether_addr(mac)) - return -EFAULT; + return -EINVAL; for (i = 0; i < 3; i++) { phy_write(phydev, AT803X_MMD_ACCESS_CONTROL,