Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1001331ybk; Sun, 10 May 2020 03:19:07 -0700 (PDT) X-Google-Smtp-Source: APiQypLP7pkK+Fb17C+tc8ScVkOqfXyCNsuwkzqZ3nUASWTpT6lx5RDimuXhf+qFCZfVqxE+74hq X-Received: by 2002:aa7:d655:: with SMTP id v21mr9319950edr.355.1589105947663; Sun, 10 May 2020 03:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589105947; cv=none; d=google.com; s=arc-20160816; b=cXa5BjkKtVbnEEn51VuF1g5HfWSM5YrlMU3eMBtx2Xo959kFGFSJplmwetPdy56qZn vJYPDSnvIQBujwk19ZC5cW+Lt2HdqV+RxMcBZeK98Km7adYRjlpetS2pog1b8PAw+EP5 CWPDHoVnravFi2p6RplJ8PRVXIPRJ5dYcVx9lHAMMNq7myrg/xdrSv1hj9MR94ZWsTkP RiHue9WQGxrHhevV8MvhNnbf8aPVu5vRl/JnLrJpQrzNgJ1HidIJ4JJHnKBwRB9E+mA3 bVdqRgt/fy05G5NYKUGA7uSc16h22LvjkqQSKDE755tzy+qR01147d7rxOEP2ruFfav2 Zu6w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=UfsaguDZ/dVMcsPDV3pT7tcAOKO4M62PixpoB+9oZ/8=; b=VyNclvr7xeufwX/Xb3QR35wm/R/0oOBX71mhaEAkQLRlMawD+8Tkf0JrfImkcdAG34 SmmW6PM67qBLEmD7sOvwBaZy9xmoSnpJym117bezbtgln0C4fzD78wcp0g6Q/q+U5sUL sifBqn6MzZCRphIkKu4C5vRneAcQJ6JuwUz+bI7gCBLMb8QvaJ/FNeDKMxCXI1RadoxE QuxCFLXODIYj+zgXWWo7+GTVPte8Q8oMBL02hmIiV4ZHgeB1K4UsJLwlfr9P4Pk30eOt ITJijYEEUohQgBs4gWF/hI7w4ZqKamSNuu+xAob1vc/R1RTKl5hKOM+93uFYPUVcgKUO o0QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=JVw1N+XQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si4867706edc.246.2020.05.10.03.18.44; Sun, 10 May 2020 03:19:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=JVw1N+XQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728713AbgEJKPL (ORCPT + 99 others); Sun, 10 May 2020 06:15:11 -0400 Received: from mout.gmx.net ([212.227.17.22]:48871 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726906AbgEJKPK (ORCPT ); Sun, 10 May 2020 06:15:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1589105704; bh=c94OQCbIxiDreJXOOPOYlV8SFiSiAocVWa/041VZVpQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=JVw1N+XQrYvsd6AeYc+5u5cw1mxRmhQ8gzhFW8lSrmJ45l6bEEge34PSxfJdOfcQG TvhMR+Kbe8lqoRu6r170Rf4e+sN8n2weZKMnuOtcjoZ7j0FuXqA9ocnhgQ+ZIYShPQ wWPzQi/UX0BIq2JAmCAjPxmCm6yV88aXLvYRWN70= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([83.52.229.196]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Mgeo8-1iv4qq0miq-00hAdO; Sun, 10 May 2020 12:15:04 +0200 From: Oscar Carter To: David Lin , Johan Hovold , Alex Elder , Greg Kroah-Hartman Cc: Axel Haslam , greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Oscar Carter Subject: [PATCH] staging: greybus: Fix uninitialized scalar variable Date: Sun, 10 May 2020 12:14:26 +0200 Message-Id: <20200510101426.23631-1-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ps47P7hYVAoS31u+W1goqC5mfPrNR/UEtJYg44fQfgXMP7xUMLR VyH32hTPzXF8DfglQWutmqHJQygU63dOrB5mN6HHOswWY/Q4ScyS4jj3LKp9UVJl3nhuWFe yf3FlT+KTGCBpvXsA6kf+esHXmEtMbut/1NvexTWaRH2WFcbZ9sSWHo4jpDWfWx2JgMVhOJ Ec8V+AP/T1B3/1EhuqEWw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:g/kiqP+Wlmc=:lF7MhoWLDll1mzH2Ei7uf3 MhpX/geJXvT92bJd6tFNz6tnzeYK6kFCy2VHvY4v+v9fCBLRVNuIJ1Oh9xvjeH8Z8hXYdEUMy 8+277b4AxH+9j9gCDMrZnEiXZBcfpwcPukj+5HnS4Wqarvr2mt7lO/sMfpNls04SIsEJUUgGS X2RJA3Azg9W3bZxF7bQ6/Uuoaxs5DihLoLkGSius8k2SZJyPk/EdTTpx2/+sHz9jRfUPNP43K HKOOjy3F5E5nB9q5KZB38ilYZLKRoGWmxaJx28cMsmdzRN5DGWSjHdYDElRivH7Us9hpAHaqN S7760GF5W84KwCLTrJe1uXDHnwDzjNAyferRRjP5qTxN+5Sm9lC1JuzxW8fD1mV4fSg/34wRJ 4cu92mj7NuJGUj233GMs8cOWqrcdQZGxg3abLmmh4q/S3zNlNyIm9wgSFRHgsR7hr7zBh/gOF OGlROH5PyOBLup0djfevEPoM+qaVq/qdRk/u5v0Tqw4QvLJrw6wYnHFmvOzsQSHkiEJGBlpXU /cL8tyZXKin3EC88MppinNmMF4XHxaqS2qvQnjpO/Wxus29uG3wAHr4BXJgmhLchkuwwjT5aV MwU25wF1qFVIGRtQI6rdUOfIAtm4wxMJ0dHnyAlUZ9HzePkq/yk4RLODB8LuiSX7cUA+wmMs0 iDc2vF3oJetpFIRaURZXIxIDsVP3+mi1eSnDD1nYrmas1vNrOE4q7XLwALvUkS8DvB1m9xIbN /S1DFpMGDKVoio2TtqYbI7hh++izSR7U0tQKE2oSzLZGlJnLlTtWFPwNncpnpVs7DEYpUbV5b EgszLtp2dqViYnc0w67UOh8ewyE63ZZc4DJp3FtCHnlepTwEV20qxM+X2xu60+gdQyJSs7R93 BQtzFHibDlUdSLqUn7bhTOI7F39qvAU4hENfCTKMT3/0w40Q+WkSoNb5/GaRNeOWYFrSxOvKJ 9M2Dl30rYcenAG5duzFEkdGY2U8Dbny2D4jM6SCT0PUqrzX3R3WQm3zIaoRbw7uFTbX2JSqgW TArH41REMiTHxkQHud0XsS0wDC1DKdDgmFPhOeVZ6uhJSgWtpzHNTCiz7haOcxPNAaKojzFXc IDsd31gqGn7hcdtKhr01i4u5xaQ18Q5VqF3o2aWp8+ISIP6UNBA3ZJWQ/DwmZKEvuIQOqfK5C /X3qmFJvSjWoUtRzRAMh13mY4CXeQrzU5FAyaDg3s+OggVESQprqeytijhN1v4nETkZh2uH1X E+1E88RE90iYt88GM Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the "gb_tty_set_termios" function the "newline" variable is declared but not initialized. So the "flow_control" member is not initialized and the OR / AND operations with itself results in an undefined value in this member. The purpose of the code is to set the flow control type, so remove the OR / AND self operator and set the value directly. Addresses-Coverity-ID: 1374016 ("Uninitialized scalar variable") Fixes: e55c25206d5c9 ("greybus: uart: Handle CRTSCTS flag in termios") Signed-off-by: Oscar Carter =2D-- drivers/staging/greybus/uart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart= .c index 55c51143bb09..4ffb334cd5cd 100644 =2D-- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -537,9 +537,9 @@ static void gb_tty_set_termios(struct tty_struct *tty, } if (C_CRTSCTS(tty) && C_BAUD(tty) !=3D B0) - newline.flow_control |=3D GB_SERIAL_AUTO_RTSCTS_EN; + newline.flow_control =3D GB_SERIAL_AUTO_RTSCTS_EN; else - newline.flow_control &=3D ~GB_SERIAL_AUTO_RTSCTS_EN; + newline.flow_control =3D 0; if (memcmp(&gb_tty->line_coding, &newline, sizeof(newline))) { memcpy(&gb_tty->line_coding, &newline, sizeof(newline)); =2D- 2.20.1