From patchwork Fri Oct 20 06:20:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Regus X-Patchwork-Id: 155831 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp859281vqb; Thu, 19 Oct 2023 23:25:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDJu9wjeV3Izm27OUA/XNaPBgeFXUMzMqqiiWbbb8wA4f6l6fwaQ5IFc2ohLXDG2Ui78NY X-Received: by 2002:a67:c092:0:b0:452:55f5:55e9 with SMTP id x18-20020a67c092000000b0045255f555e9mr1395940vsi.14.1697783112208; Thu, 19 Oct 2023 23:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697783112; cv=none; d=google.com; s=arc-20160816; b=CKOffZyfK4gLKrOIO7oHqaLqQbT6pXw19Wgenjqt33cRMY2wk7GouvlVWO3Il241Df sst91Qag9IaPRhU2vjMjoAN091RlShdOklYMvUs7bAQdCru7mDyOu0dJhBp05/99BA8N /MYOfBmVnGURKxwvIBVajJU8ZsQhzjoe0s/kt/AkHuGbq9UfmdSBA0EztJnAh/Ov0JPW 9WMXneO5kGLXtQQ/1thlr7kNQkYnszRdLwvc4WJUThJKpQr5OzwGPMsW35tqdGaWu2jt KpcH6EQAnI9qxaiIkjdD64gM2UVnG1O0khq/sSxkHfjeceTujkg1e7KIgyHelejBrbja P6Ug== 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 :message-id:date:subject:cc:to:from; bh=u3oUs+zozN4nentwvbW/cwV4BMthJTLQe1nAyuF4COo=; fh=NQyJlDnuFNf/CZsFROZSq86/9CrffTFTfgQnrJMo+fg=; b=hFm2ceanlS18xJnezw0KfSUBDHY/uBOpBcuAkmOfBbmx+0DZS1in/P1NXYvGjafbsR H4Yr1sjQ06v+hoikCIqpmdkg7FmcpF/VCGhPOUkLpFnICGkqDkLcE8gjjObk9/blPN+/ hSbmO13cbf71uBcx81Eagvb0+N0lTqHG15viaWUy7Aztk+caqJBx1dDyReV0N4KlVQdT 54aF+En7ATsnOZBevq82Klca5PBTAU5HKF9Qwy63yr3X/RjyppE7c0xj9/reyEppIyHf fGg///b3+Ip/7dm1/ARab7txV6Y3DMEp0EzAtqFOk18O2a+/nTyLpHjK5ZrvDGZnp5gh O9Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id f5-20020a056a0022c500b006bca1443f29si1344038pfj.297.2023.10.19.23.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 23:25:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id D70448290994; Thu, 19 Oct 2023 23:25:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376326AbjJTGYp (ORCPT + 25 others); Fri, 20 Oct 2023 02:24:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346657AbjJTGYn (ORCPT ); Fri, 20 Oct 2023 02:24:43 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55576D46; Thu, 19 Oct 2023 23:24:42 -0700 (PDT) Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 39K4qx3J011300; Fri, 20 Oct 2023 02:24:30 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3tuc08jr71-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 02:24:30 -0400 (EDT) Received: from m0167088.ppops.net (m0167088.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.22/8.17.1.22) with ESMTP id 39K6Ijcb016122; Fri, 20 Oct 2023 02:24:29 -0400 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3tuc08jr6w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 02:24:29 -0400 (EDT) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 39K6OSTt034550 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Oct 2023 02:24:28 -0400 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Fri, 20 Oct 2023 02:24:27 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Fri, 20 Oct 2023 02:24:26 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Fri, 20 Oct 2023 02:24:26 -0400 Received: from debian.ad.analog.com ([10.48.65.126]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 39K6Nx9Q030648; Fri, 20 Oct 2023 02:24:01 -0400 From: Ciprian Regus To: CC: Ciprian Regus , Dell Jin , "David S. Miller" , "Eric Dumazet" , Jakub Kicinski , Paolo Abeni , Alexandru Tachici , "Andrew Lunn" , Simon Horman , Yang Yingliang , Amit Kumar Mahapatra , Subject: [net] net: ethernet: adi: adin1110: Fix uninitialized variable Date: Fri, 20 Oct 2023 09:20:53 +0300 Message-ID: <20231020062055.449185-1-ciprian.regus@analog.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: Rpz_IqZxEPt2g0CkplaSGHuB8eXhvwAD X-Proofpoint-ORIG-GUID: d2V22XTgghNcfe8VsbGA19C_TfI3FeOg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-20_04,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 malwarescore=0 clxscore=1011 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 mlxlogscore=965 bulkscore=0 mlxscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2310170000 definitions=main-2310200054 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 19 Oct 2023 23:25:09 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780254624560812004 X-GMAIL-MSGID: 1780254624560812004 From: Dell Jin The spi_transfer struct has to have all it's fields initialized to 0 in this case, since not all of them are set before starting the transfer. Otherwise, spi_sync_transfer() will sometimes return an error. Fixes: a526a3cc9c8d ("net: ethernet: adi: adin1110: Fix SPI transfers") Signed-off-by: Dell Jin Signed-off-by: Ciprian Regus --- drivers/net/ethernet/adi/adin1110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c index ca66b747b7c5..d7c274af6d4d 100644 --- a/drivers/net/ethernet/adi/adin1110.c +++ b/drivers/net/ethernet/adi/adin1110.c @@ -296,3 +296,3 @@ static int adin1110_read_fifo(struct adin1110_port_priv *port_priv) u32 header_len = ADIN1110_RD_HEADER_LEN; - struct spi_transfer t; + struct spi_transfer t = {0}; u32 frame_size_no_fcs;