Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1451274ybl; Sat, 25 Jan 2020 00:46:16 -0800 (PST) X-Google-Smtp-Source: APXvYqz9HFoWR3HdJGCoUdTcPFrPrSaxWSaW139buGpnRn1Yo68FBSENiqa7PfiX9R9NfPQsOxtx X-Received: by 2002:aca:5490:: with SMTP id i138mr1923962oib.34.1579941975874; Sat, 25 Jan 2020 00:46:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579941975; cv=none; d=google.com; s=arc-20160816; b=DPT/n+X3K4ZClvqvDRsXpgwquc56MnRE5hPV6SA6TjjnSzBMczct6+9IoasrND2LWK zjdcECX/8JJyw0u7WF2vQ9HtM8L2QjUJk3Qxb6EJ+LyWJjZjZW7DMUvKuTMSjvcroghc doLukW9MqLk6WrX0tC1v8T49Q73UOUgp1/lodCvPUwNbvl7AoxRnucLc3xsksmUgXySl ZsqFBIJHkTrsDf+YjvTDpxxUSc5SeelTRVLuIIke5EFaHgwq6Qnd+gxC8ZmLS8yF7pL5 N34UHqkOcJfBcml6J0W5NyubXlzkYBbI8Qo95t4GSj0j6roz6F+p7GqSzvpdk4I0zNMu +fEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=Sg499Tfb3mohA4p0m6z4rC8Gw18lzl843VQiZsEcJYk=; b=tjJxoPoTIAXFP7gp7BhWIMHoFTk6XeUamj962EEwt6oIcTi2My75Kw8jzcDKEZ3/Fq IJR+BghCbHPy0p426a2zmd9T0AWdXe4fuZCVwl+4+0FjAypgNfAE9J+fywvahMesvp8s DWlDvWAuE4xw+LI//+7Ow6J/dtoOAa1/EPBWfQddsUtOjmgzC9rJJB2D1q6rFW84zJ1a W0qT+krwCj38ERpVmrKNB6pTfU8JEVV1mLPGuw9tffw8XEAmrXf6sJiTsFndk+WvP63h U9y4HeImeVLcs0TElCliACorGKDLkMIYKwafi0w8+XPApukikMz3YrGlRs/rNZJgIh+m W+XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dk0l57cF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18si4163351otk.206.2020.01.25.00.45.51; Sat, 25 Jan 2020 00:46:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dk0l57cF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727699AbgAYIoL (ORCPT + 99 others); Sat, 25 Jan 2020 03:44:11 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34963 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbgAYIoK (ORCPT ); Sat, 25 Jan 2020 03:44:10 -0500 Received: by mail-pl1-f195.google.com with SMTP id g6so1790515plt.2 for ; Sat, 25 Jan 2020 00:44:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=Sg499Tfb3mohA4p0m6z4rC8Gw18lzl843VQiZsEcJYk=; b=dk0l57cF9lRQaWGwIvxjXe+NoAH6ao/tNUFBd/bpqpCSWiIjuln2HYMQybiYS21HnU IXF9wbTdpRCaxLd0ITc/LK8Y3RgXgYgAVm+pGDfy0n8Hg72ut6O+1B916MNpkiQpDRI1 sfg3rDCfNaUB1QGNROSBfbGaqrHKOFxRz+NW9Ga6EX8LRFAGQxZh1R5V3aS6OGF9ZLvr IPoQZq/PkwUjMiGEGsQU9e/I+6SsRGbZDsREZJFZNY/Q5TeZbPtYGGgiWXlk8f5Tcohf ug9fGjCLhuY1k6Snd5s63f0DSwFkIYUIlwhLiS1+l3tnZlWPt51tLdp/fgFpVeeS+BDN MOLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=Sg499Tfb3mohA4p0m6z4rC8Gw18lzl843VQiZsEcJYk=; b=TPwk0OLbUN0ZDYnSauBZlANZyGGjeLqEqHTGCp+EgGueXhlSjxoqskj1wohQEIPCnf X5AwtBjEKgAjVfVqORL4bLX5NV/UBDfTb5DDp6Ol2fj9USOn5RQfQiHhCNT6YaVCMhSw mKI1cgQrxt1l0eVNKmP6wSj915YkLxCPBETnJDMRW9PCSmekhlrDkMgwdlHVQzR+2Jtt JQO0IdyyLKWCgnw2Ux1L0gWq5HxnOCP+8HRq6XDlEeZjhk03OHg7wgRPK7fhvisOBCbf v79L3zRk1DxYeDuE5npDUgLrP/COMH+AVa/j792T7r6luoyAB4WYyQicWd+YeIP8S0V6 L3Sg== X-Gm-Message-State: APjAAAVWZ3Ji4yoYNVynsxNexa83n0kH1L5Izg4b1BEtkRn+BKTtureW pEisTVT78ROITv/pY6M501U= X-Received: by 2002:a17:90a:8a12:: with SMTP id w18mr3725137pjn.68.1579941850044; Sat, 25 Jan 2020 00:44:10 -0800 (PST) Received: from google.com ([123.201.163.7]) by smtp.gmail.com with ESMTPSA id w38sm9267986pgk.45.2020.01.25.00.44.07 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 25 Jan 2020 00:44:09 -0800 (PST) Date: Sat, 25 Jan 2020 14:14:03 +0530 From: Saurav Girepunje To: vireshk@kernel.org, johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH] staging: greybus: bootrom: fix uninitialized variables Message-ID: <20200125084403.GA3386@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.6.2-neo (NetBSD/sparc64) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix uninitialized variables issue found using static code analysis tool (error) Uninitialized variable: offset (error) Uninitialized variable: size Signed-off-by: Saurav Girepunje --- drivers/staging/greybus/bootrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c index a8efb86..9eabeb3 100644 --- a/drivers/staging/greybus/bootrom.c +++ b/drivers/staging/greybus/bootrom.c @@ -245,7 +245,7 @@ static int gb_bootrom_get_firmware(struct gb_operation *op) struct gb_bootrom_get_firmware_request *firmware_request; struct gb_bootrom_get_firmware_response *firmware_response; struct device *dev = &op->connection->bundle->dev; - unsigned int offset, size; + unsigned int offset = 0, size = 0; enum next_request_type next_request; int ret = 0; -- 1.9.1