From patchwork Fri Nov 3 13:14:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 16218 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1022887vqu; Fri, 3 Nov 2023 06:16:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBDaCFAId0hY6dAW0OBdPN9HIh/sfyAYlHZpgR3V1JLxJLxDJsY5FQIG6VtoQnrUfsYnAe X-Received: by 2002:a05:6a00:15cc:b0:68e:42c9:74e0 with SMTP id o12-20020a056a0015cc00b0068e42c974e0mr21196364pfu.3.1699017378689; Fri, 03 Nov 2023 06:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699017378; cv=none; d=google.com; s=arc-20160816; b=dlTbXm22Ch4PRPqkv530Zh6iqOmFA6azrcCKEyiq4f8v4t3Dhc3ctSeXbmzbJwbkwC irK0OERTprMRYZFfpkqy+zD4VmgFngruErkpbd5d/KIS4Kvse3fYqt887yZKGFsbuCkF uKKjTj7pcSE6i2kG91SeK88cBnne5YHCiy/ZkL9sZwz3+PvuCE1w5A1qZTidZLHJH8ud dqbabSLUvh9HJ0zGkHZgmPYlk4yljQhTdetO4MPsltKf+qAfBwW3Rw1E/1BKXDBVnFTq ePPxCDFqvPeVYpoul+A0PqHPwPEr+Bmaq+nm2/eVHjv4MU2b2JpVgPs8eqLVUvVWoOrp 2GEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=bdJnebQmFhY/bXrDs7IwA5cplPvVJW5t4uUUAYJ589w=; fh=0cAJsU3S0k7pAUOUcyB22u59h+m1QSgwv+f59I5MLSc=; b=DLadFJgDd5Gr+JhwTN9Ni6nGYkpJMtD/tpSlW/oAwG25tb26aAjUdwAZI/+NEQbe8o rFs8EajhVL2qsl3P8xgxZRoHq0/FoObIBFhPzr8AOqN32E4qeD48rO0Ys6OF+neaBl59 puS1CvnD+ne/Ej0YTtfaiOE0B2CXCknuHW8Wqyi9jLr38sdxw7J6C2RmArdIoOQZOALh 5olKyzJlPGUoI/rPYSxkHdX3FQo6kPW5nIS5NgV+An4/RQQXegDdIvVFLEQSF58MevQK Xq+WufW0yb5D6urKybS7qn3ITJif5VbkxkNcwEFuE/1EFiZltlE5x41k1JcZRai4bbsC Fymw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="Czwzs11/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id g8-20020a656cc8000000b00578c9144913si1517325pgw.364.2023.11.03.06.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 06:16:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="Czwzs11/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 0E5918062BAE; Fri, 3 Nov 2023 06:15:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377601AbjKCNOr (ORCPT + 36 others); Fri, 3 Nov 2023 09:14:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233264AbjKCNOn (ORCPT ); Fri, 3 Nov 2023 09:14:43 -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 36220D76 for ; Fri, 3 Nov 2023 06:14:25 -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 6FC349D5; Fri, 3 Nov 2023 14:14:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699017244; bh=i2C16ss8SU23ICZxAiGfhvextYtfxnWVPgHeWfkSoRU=; h=From:Subject:Date:To:Cc:From; b=Czwzs11/X/yNWBecRFQ1k/8kIRRYWLNB4sqLYl7UzRQ5EznDeUI0dRBQS2F7q6dww tJA5HEcsS3z+WXeZ909xvH8YeNAnH1UTd8txGvvkDojy1vxpMHgBsvbrQfV56+2JVJ Hv9Xbtyw4vjMceoR6d8WLSr1B8kZ8zfxe1jxom2s= From: Tomi Valkeinen Subject: [PATCH v2 0/4] drm: Fix errors about uninitialized/wrong variables Date: Fri, 03 Nov 2023 15:14:02 +0200 Message-Id: <20231103-uninit-fixes-v2-0-c22b2444f5f5@ideasonboard.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIABryRGUC/3WMQQ7CIBBFr9LMWsxAa4uuvIfpgsLUzkIwUImm4 e5i9y7f/3lvg0SRKcGl2SBS5sTBV1CHBuxi/J0Eu8qgULWosRMvz55XMfObkpBaz2flejS2hao 8I+1HNW5j5YXTGuJnr2f5W/+EshQoTI/DoCx2bjpd2ZFJwU/BRHe04QFjKeUL5z3L1a8AAAA= 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=1102; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=i2C16ss8SU23ICZxAiGfhvextYtfxnWVPgHeWfkSoRU=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlRPInF+kKt7naFwfYCihEN2y1q/8QD8VR4B6jh tiU8k7GmC+JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUTyJwAKCRD6PaqMvJYe 9fEJD/9FBGxkHooXw4umZF29JT0XLb5YXar9XWLXKOla2GhqNST6Sro5x6m36XcRYuHr/IPze8S QdEvDj6DrAd8c8X2/SlSoL+AJntyzIFsVZIqlt7HyDk8rc+ffhsV5k8IjPLFTVgGsgL5h1GW02q 82V2vBWFPrZN1RJ95SsQcSUjQh0Hu8v+SC3I7BpSokgDUJNIJZ47NIb4V0O53/gg5/nr+GXM67Y ZxvVnSrdZU5MNIHy857asHYIojQH6BZ22niEO1DyXTC/HU9j5wUZ9x5Z95Tvrve0pEYU+AzMq9Q gWmynWaeZ4f+QkWCeVFbzlYhbojldHXbMiBgkGU04D/K3f1MuwHm35YmhRaS0CSO5MNBrR1kciu zx4R1C4esg15e/9+YV+WJoL9EDOD3x7R5CzQMncjYKZp3JWcMUZIp85YdPXc4AQ9ACenjtdQRXx ZJxWp0nID/lPlkI09kESHg0qiEe9Ll3Cv4EzJuzOm9fv7E3Fxxsd3zbsXimKFsb1mWGFB74GZS9 NtrGux3zp89lzOh/zQOWCnNYQaGqerVYK05wnPVXtjP6LGG+M1aKXkzJN3z9Wv3ILsFQ2F+jCt0 MNmbnylidgRnjhYNzSgENDt/ZhrWuc2eSN0vK2Gk1j6hUXhAoEjfjimL+YBgRv+KgbkTZn9hSMA KzKntri/ApWsOug== 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 06:15:28 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781548846676204126 X-GMAIL-MSGID: 1781548846676204126 Fix cases where smatch reports a use of an uninitialized variable, and one where the variable is initialized but contains wrong value. Tomi Signed-off-by: Tomi Valkeinen Acked-by: Maxime Ripard --- Changes in v2: - Added two more fixes - Link to v1: https://lore.kernel.org/r/20230804-uninit-fixes-v1-0-a60772c04db5@ideasonboard.com --- Tomi Valkeinen (4): drm/drm_file: fix use of uninitialized variable drm/framebuffer: Fix use of uninitialized variable drm/bridge: cdns-mhdp8546: Fix use of uninitialized variable drm/bridge: tc358767: Fix return value on error case drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 3 ++- drivers/gpu/drm/bridge/tc358767.c | 2 +- drivers/gpu/drm/drm_file.c | 2 +- drivers/gpu/drm/drm_framebuffer.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) --- base-commit: 9d7c8c066916f231ca0ed4e4fce6c4b58ca3e451 change-id: 20230804-uninit-fixes-188f92d60ac3 Best regards,