Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp470877rdf; Fri, 3 Nov 2023 06:16:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0x1OR+pChCLvsXLtIsIvJldPEQtLsQ8A8dRh4oX9Wd2xdketUZpBySftHQBrrgqic1Wmg X-Received: by 2002:a05:6a21:999f:b0:181:98d6:6afd with SMTP id ve31-20020a056a21999f00b0018198d66afdmr5376500pzb.41.1699017405244; Fri, 03 Nov 2023 06:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699017405; cv=none; d=google.com; s=arc-20160816; b=ay4Bg2R9HL+INZi0Iyyfrf8KdIt3f4t7h2V0mPbqmo2qucPsYO5kToXaG4huNixb4m ophfsTnl+4EdXC8cAQD4osWjTcBKdgEp/Q63rL4oo/NGrvhF9HQPdg9yaQTT4Bkcf7Mv S20pGB+GB3Ftk8sU2ET9h9MmOgdYnNctoa0jQiNQIIDtpG97wSVN2/a3XNV9Vg7/W2uA x7AMV4YTs4kLFGQ6SWs6nMtzVM8LiK7HLtmzIWutWOJXaSyHrP1yS8432f2WQTI4UQ64 VcRFz4dJzFA6lYj9DMD7K2jr+jyAq1kThKPyceBPpWeWqoNriq0gDjzpIRklb8Mb31IG xiEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=pjgpo2VA6t+XQQ6q7F+AJkWZyYa7oOMdA7W5DpZBlJA=; fh=0cAJsU3S0k7pAUOUcyB22u59h+m1QSgwv+f59I5MLSc=; b=jiF1g6xxrUfHst5Jm4JsGpHtMH0+5As0LkPSTWWVa0Rm79tT8Ul58VnnLAaAZ6y5F1 oFOFTkpPUFKm6kFgmcZaVGX1O4DieUpufPm6BkLYdZ++E0FWbJn49u66K/vRA2DUpf8Z tYKnr8SUXgjtfD6GyrgrHPDaDVDRvcR+aldkWNVaXXhNpCcBydH2pcsb+NV0gssSKxWb RY/+vEPUlZyHGOQBT2P8JmyBcLDLqdTAn4ULqPR58H/xJnHX7RQFInia/dx97MxBv40H yA67P5jISxW/UGK9kx4J1EZWXzHvewUxkOYuU4fXLRx+VGNBCvtWqXDk/cHs82vz1Axy Xjyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Ykodq0rZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ck5-20020a056a02090500b005859aec9406si1619095pgb.16.2023.11.03.06.16.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 06:16:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Ykodq0rZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B4B5480D6AEE; Fri, 3 Nov 2023 06:15:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377679AbjKCNPJ (ORCPT + 99 others); Fri, 3 Nov 2023 09:15:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377627AbjKCNPH (ORCPT ); Fri, 3 Nov 2023 09:15:07 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42641D76 for ; Fri, 3 Nov 2023 06:14:43 -0700 (PDT) Received: from [127.0.1.1] (91-158-149-209.elisa-laajakaista.fi [91.158.149.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 91371BEB; Fri, 3 Nov 2023 14:14:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699017246; bh=zdGGDGGi0EjJoJXJD3OePDCfsWtgBRwsx7Z+r8jYoyA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Ykodq0rZICsxpK3As05OwmeuKKRSc7UhBzxtHtAgoOm44Sb6TfveAeBC3p2QmW4yG ItylLtyNGJK61KVKVXmLi80H+AjsLe4rAq4ffGIZE2uoJ442HwpM0uymsOZD6PaYY0 VKv/syGSd1uRc4UvJjkQHh6CpVp5BFGGjBQfeTM8= From: Tomi Valkeinen Date: Fri, 03 Nov 2023 15:14:04 +0200 Subject: [PATCH v2 2/4] drm/framebuffer: Fix use of uninitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231103-uninit-fixes-v2-2-c22b2444f5f5@ideasonboard.com> References: <20231103-uninit-fixes-v2-0-c22b2444f5f5@ideasonboard.com> In-Reply-To: <20231103-uninit-fixes-v2-0-c22b2444f5f5@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Laurent Pinchart , Francesco Dolcini , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Parshuram Thombare Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomi Valkeinen , Laurent Pinchart X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1032; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=zdGGDGGi0EjJoJXJD3OePDCfsWtgBRwsx7Z+r8jYoyA=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlRPIsWu+CRgRS5bZtVv9evyDD5YSsgvRh8ehjM qDeOXjyVkeJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUTyLAAKCRD6PaqMvJYe 9XSiD/4qJVFOddephYbYFQsGjgjnyGoamkQnluXuBX09mIL4+G8dJth68eLvlTFnCaPAO9QwR5l 3TWv+SMFR5DDmlGn0tR3VrggNqPe2riOWGT2TAlpGtluD6a9Hj0hRmx+b8tL2WVXCjsGVFDB4Cn 8oQ9RcCVyiv50KWeBAF4gUoVYndSusuHH87eJjmvA4EXqU/m5kyqJLe+jeO+x3MrH8hC+kcLFmZ 9mUI069yxsthJFSZJjU9oSur684yA7FUdqCXBwyl1JcVLd3+LZcZyiVcmcp0amIOuTsvFZxPx7j KIeU44AQnLhtCADOFl02OKktxXEHi6B0q9Y82VGxZ7OlUvD+gTZnlLAoP2U5n7Ix0V5w7+FtdVR od6r1qIuVLDxvfNHEU+hGpJ0vdNpoFWCwphMVC4zp/O1pIxnzSDxIItIzKgh5mEkpFN+WXT3bwZ veocAeyq7iuxKpwdHXtqlEQVX/+ZWrUZOqsScRNjcVVG30ePi9ZRzZm8KSlJw2biyxXsMhcbRTC 9cIb6yrNVZfdYA0LbagOhq0xEejlJANNHVYxxrtyIU56N/yUCpzPwgl5R2h5hN+mFEpNMBto2IO dAgSjJBil93r3dnhCdE9s1ssyRYszqFnhgeRmj+o7gLeI+8UoBXeDh6onU+dh513wUEjGjcmR8z y4TZMtPPefBl00g== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Fri, 03 Nov 2023 06:15:41 -0700 (PDT) smatch reports: drivers/gpu/drm/drm_framebuffer.c:654 drm_mode_getfb2_ioctl() error: uninitialized symbol 'ret'. 'ret' is possibly not set when there are no errors, causing the error above. I can't say if that ever happens in real-life, but in any case I think it is good to initialize 'ret' to 0. Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index 09e289fca5c3..3cc0ffc28e86 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c @@ -583,7 +583,7 @@ int drm_mode_getfb2_ioctl(struct drm_device *dev, struct drm_mode_fb_cmd2 *r = data; struct drm_framebuffer *fb; unsigned int i; - int ret; + int ret = 0; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL; -- 2.34.1