Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3040440pxb; Mon, 18 Oct 2021 07:07:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw09DvBUXIrOx0GuYEb51kBITIQYadstx8ZuYj8frMkC4fo0rZUyx5yoErrvBMSNbUGgrKv X-Received: by 2002:a17:906:cccb:: with SMTP id ot11mr29083513ejb.219.1634566061070; Mon, 18 Oct 2021 07:07:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634566061; cv=none; d=google.com; s=arc-20160816; b=xVEr4KoIurXF2q+gOe6Lvvtc/clqaFq+svbWyHBs2+PlyBkSGF+D8hMSFPpyGPMvet 3wd2LSy7w4ZRLEl+NBNYMdTfK6xrMA5bQM9E9VAV5zUOvgEDmZHORlNjb8PS3dXnOG+n x+KcqiBraM4u9EZ8TnAnPsgfBqvK+ag2Hjgd4ztgRA155Ci0ktrOOsPOIADd4XG51m50 f5LJZl9ojQLv8cBsrYT441WBUIocqu4PdqncTPGOBy5kr6EJSPA2TpeN2DG2C55QBkAr UDU92VZqSvaAQYE056ULl2G5BxdCe7Dls2Gv50suxg9g78BRRBm72g9+vrdnv3TarTBo Avag== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rH7AZmUlS/lsQ1bYB+LMMQqH+v4Ida20Wqg7RYh7oj8=; b=gfCT9eo9liuVuC8yMaM1NX32XtdgbBbTePAh01IqYsnxhLCExmZwhM7zec6s2r1UfJ Q1y8GpjaFDbxqvd8lXMtChPgCYyma5N2j7CiC1+TC9DBtsc09P4GDfF8Qlxkdfprh1Ca tdjHSSwv/e513eS7jCnEWsAXJLzh4iUseH5Gms3V6y1QJJLd5+9unUwxbhEtecRuB1SJ 0h141R4uM3ffhBHUzguKReWMsX6f7DOPuPNwLlQDAUXrZG/k4zZeXFKsHp7P79wefSIq WCp0ND90IMS9PvVE4fxWKFLmFN71q7WMoT5ttGvB416bh+8zoKkbSmYenmsP5YsmAyCA GlOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZfZrcrrw; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e9si4621112edz.482.2021.10.18.07.07.16; Mon, 18 Oct 2021 07:07:41 -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=@linuxfoundation.org header.s=korg header.b=ZfZrcrrw; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234768AbhJROGX (ORCPT + 99 others); Mon, 18 Oct 2021 10:06:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:39834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234818AbhJRODS (ORCPT ); Mon, 18 Oct 2021 10:03:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A74F3610A6; Mon, 18 Oct 2021 13:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564611; bh=/+fv3M6e4tZV0XEHFtkrthpnHFGfVGANl86RrK2DDG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZfZrcrrw5uBViRt/p3r+DTO2Y+CZZD100rozmBOMrgUnKYy2plECzfIl+bnhs7mLC rUFPPeWF4hftTWZm/6aIrS91fc+QdSMN4wDfBlqvbgTfnu43Prbt+w61wmKIJZmmWK ZiuYhWgx5pRX5iopUF/44k/f8N5y+SKmIzBXYYIY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Gioh Kim , Jens Axboe Subject: [PATCH 5.14 143/151] block/rnbd-clt-sysfs: fix a couple uninitialized variable bugs Date: Mon, 18 Oct 2021 15:25:22 +0200 Message-Id: <20211018132345.308431405@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132340.682786018@linuxfoundation.org> References: <20211018132340.682786018@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter commit 7904022decc260a19dd65b56ac896387f5da6f8c upstream. These variables are printed on the error path if match_int() fails so they have to be initialized. Fixes: 2958a995edc9 ("block/rnbd-clt: Support polling mode for IO latency optimization") Fixes: 1eb54f8f5dd8 ("block/rnbd: client: sysfs interface functions") Signed-off-by: Dan Carpenter Acked-by: Gioh Kim Link: https://lore.kernel.org/r/20211012084443.GA31472@kili Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/block/rnbd/rnbd-clt-sysfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/block/rnbd/rnbd-clt-sysfs.c +++ b/drivers/block/rnbd/rnbd-clt-sysfs.c @@ -71,8 +71,10 @@ static int rnbd_clt_parse_map_options(co int opt_mask = 0; int token; int ret = -EINVAL; - int i, dest_port, nr_poll_queues; + int nr_poll_queues = 0; + int dest_port = 0; int p_cnt = 0; + int i; options = kstrdup(buf, GFP_KERNEL); if (!options)