Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp973432ybg; Mon, 27 Jul 2020 04:47:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze5VFffixa3EWaEpKHXFKSR/4mqPEVhV49f8kpQMTFJmWxkFc0s42YlM9vt3uMEvmoxNPI X-Received: by 2002:a17:906:c201:: with SMTP id d1mr20366333ejz.40.1595850428159; Mon, 27 Jul 2020 04:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595850428; cv=none; d=google.com; s=arc-20160816; b=TFXIR4uDAqcBk67oiPpltXcb1G6mXKQscyHKUsLodO4waKHr/oMbk7szgv9Hwn3uHy h7Le9z2sufcUBbMk47yJl/bAHF+XSQ5S3IuRephmfD/6ERoLWerNN/fC8To5NvUyE2Y4 uHWDb0BWoRGpi5p6m40M3LfHL/DE6aLRp5+8T34skVOH3VH4aj5XPIaCi2yYlAbn8T8a KuNwO03UYDpbe0FvJNQFJM1do2eF2F2lLtiwAg0H1OWwq9nB7d9KGlYckYz6KyeAwiIx H7qyOC+APZV250Mnf+TXp/Y84/MXO1q3QeKwdTQqsDks4tslpc4mw3rB0oY2S6u6Vqbb WJRA== 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; bh=/2Bqbh6mqEzNlmJp3/m5FcHLpogK8hoaUEdhgHBnRQk=; b=JCMbkrIF0mOpL0KgFRPMiIt0H9C6NIhNlTuJm2rWTQkIvob6g7yFR1vbzoFtn+xEpO bozHTyZcKVOqr+5OAIjjUgQIa6Xq3jH3v1RQUISJ3xFP/itt6qEqVWV0CxwuIa5v4CnV Imper9AaTBKjqw+tdQe+WZodY4H7LhSSQbKvJDqYS0hGelziy+igBLk5w3Ib2nH4C8bZ B8y/69nngx/9NTvOZUk0dsjEQeKdJkDRAZ0+TImMGlm1QP3w+VAtFxuqI9jb1+Z1dPja UmZUrTIHHlS9GCZYClt8gVaxJrg2cEEKiQ7BpqhMtbxF8r08HxlB3dbsz4NWjteMqrxU 3YYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=cwY+dBq9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oy1si2499414ejb.733.2020.07.27.04.46.45; Mon, 27 Jul 2020 04:47:08 -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=@oracle.com header.s=corp-2020-01-29 header.b=cwY+dBq9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728000AbgG0LpY (ORCPT + 99 others); Mon, 27 Jul 2020 07:45:24 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:54088 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726599AbgG0LpX (ORCPT ); Mon, 27 Jul 2020 07:45:23 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06RBgkOY131177; Mon, 27 Jul 2020 11:45:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=/2Bqbh6mqEzNlmJp3/m5FcHLpogK8hoaUEdhgHBnRQk=; b=cwY+dBq91vP6K4S/p3qzO7J1vrmggFsezqZnrUydf6kZ8YxdNkrAblw23f13pv7PdaVr bvBy5typaaIrD1BbGqXZE5XN++9OgiXXJZyP3Y3u2VjJGDSGTFqv4bw7QImVRn1Yt4pE cWRNd146HxzSb0aU+laHDhQCC23QXCrUTza1oluiWZXN3Du4UNSmnYPkx6r6fzr3M47E no4fDY+MTuCxhHrs9SPfmdWiUiCduNLsthZcR1VmGrrRu/GoWRrYy5Dps0JH+8wC5p2C 97W3crDVz7H8ycBkqh+IY3PLqNUgeiEXG9+CYw8HL5u8hDRoyqxkRODAKNDW8UkMY1Sa iA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 32hu1j119u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 Jul 2020 11:45:09 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06RBhGp9154648; Mon, 27 Jul 2020 11:45:09 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 32hu5qhhu7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Jul 2020 11:45:09 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 06RBj0gB014202; Mon, 27 Jul 2020 11:45:00 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 27 Jul 2020 04:44:59 -0700 Date: Mon, 27 Jul 2020 14:44:51 +0300 From: Dan Carpenter To: Dinghao Liu Cc: kjlu@umn.edu, devel@driverdev.osuosl.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Julia Lawall , Stefano Brivio , Shreeya Patel , Larry Finger Subject: Re: [PATCH] Staging: rtl8188eu: rtw_mlme: Fix uninitialized variable authmode Message-ID: <20200727114451.GA1913@kadam> References: <20200724122957.30411-1-dinghao.liu@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200724122957.30411-1-dinghao.liu@zju.edu.cn> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9694 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 mlxscore=0 suspectscore=18 bulkscore=0 malwarescore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007270087 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9694 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1011 malwarescore=0 spamscore=0 suspectscore=18 bulkscore=0 priorityscore=1501 phishscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007270087 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2020 at 08:29:55PM +0800, Dinghao Liu wrote: > The variable authmode will keep uninitialized if neither if > statements used to initialize this variable are not triggered. > Then authmode may contain a garbage value and influence the > execution flow of this function. > > Fix this by initializing it to zero. > > Signed-off-by: Dinghao Liu This matches how rtl8723bs does it. Fixes: 7b464c9fa5cc ("staging: r8188eu: Add files for new driver - part 4") Reviewed-by: Dan Carpenter There is a quirk/bug in GCC where it's initializing stuff to zero sometimes instead of printing a compile warning so this probably doesn't change run time very much. regards, dan carpenter