Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1327416rdb; Fri, 20 Oct 2023 15:55:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDLJuV0eL0znzMd9TAknp0ZtcAGyqUc5RmfthYcyVj+WGfWO76m8V6B57BYZCdm3ab7QM0 X-Received: by 2002:a17:903:294e:b0:1ca:5a82:e582 with SMTP id li14-20020a170903294e00b001ca5a82e582mr3530789plb.22.1697842505030; Fri, 20 Oct 2023 15:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697842505; cv=none; d=google.com; s=arc-20160816; b=ksDjPSacLIM17sTDB9eNuKWXUdz3ZbpihChmcV7QsE1pmxAvaWg0MP3vzaBJKd5nyN AbEGl2pEgY9Lv7oV7oJvS7DxCnSc6thveKh1ftXL6wDFXheGEogO08/MOUDazgmVEuEH LWHjWLy6uciJLF412cWxwbMR09j5wNHnuGS0/vu14kuwbZsNshR/HMVM/SN5a0u7AUs4 pPl/sOpo6OB1nBI31ip/Wif8KNMiplxl1QlmkNudHVU8xXl5/r+4SswwHPsh48UAGCQI Zb4XcEs9uIseUJJtZjKmmonyF8ejJh6R6wm4HpNK7x34meVCCq3YHhG9pkWfJwCTsbtZ v+uQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=qFRLhmS2CQCqNG3Gndm1rIdWDDyvH+OTofhMbIHOAf0=; fh=Nlwr9gfafUBeUgiMW4h9Si49OMO65mtO1h4sOC/yEzE=; b=VxDgdPfbyx8piGyD6uezNIqmA3do8D0bSfbNm8NMXkXUfGr7c8rmpJZg6hofZ1rNXx OhInMVgcM1podGPz8nSmpjFC2aVew2Qj0TV16wy++/p4SNfwmV7jud4juuVku56TlLby Mtfdzr3ZMargSMVcZVkP+ZpWCh9bZxvvVgPZ2fzw/uZbGQADogbOewFMWEekipOxVp6W 11bXme+gTUdIRQPhm+9k1u19c74iXbqsrPJwt+iIxZ2oGWc4KudO3WiKtUZnGL/SA3Ii Fj7V7gpWPHgHCpbwAYZPwtEd/4TaphhbaBdcAzLJHx1CtI916omCbEh03GqZWFTkcu+p ByUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QAfKHyDr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id u6-20020a17090341c600b001c62b9d56f8si2674809ple.606.2023.10.20.15.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 15:55:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QAfKHyDr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A803E82D2B6C; Fri, 20 Oct 2023 15:55:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230086AbjJTWyv (ORCPT + 99 others); Fri, 20 Oct 2023 18:54:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjJTWyu (ORCPT ); Fri, 20 Oct 2023 18:54:50 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFD8D68 for ; Fri, 20 Oct 2023 15:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697842443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qFRLhmS2CQCqNG3Gndm1rIdWDDyvH+OTofhMbIHOAf0=; b=QAfKHyDrAfN7Y5Qccy+DYy707PCW6ZuGHWAb9FQ9gVPFGTl3kaonhmsfi6uUvUykrLW6s9 S3Dnaf1e+bdTHHTtA1SyntMoDBbMcM4T4GqeJvRf3QbuHMcQ/+/cWguV6uAxjX5V99ElCz kdKfjJnlLbRLKVjepnk8mC57AEbwyEY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-257-Dp0jy4rKMSiZ67rfzU6qWw-1; Fri, 20 Oct 2023 18:54:02 -0400 X-MC-Unique: Dp0jy4rKMSiZ67rfzU6qWw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-40768556444so7821885e9.3 for ; Fri, 20 Oct 2023 15:54:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697842440; x=1698447240; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qFRLhmS2CQCqNG3Gndm1rIdWDDyvH+OTofhMbIHOAf0=; b=FEyMfjRth98es+CzSpvwKEfwPZUuFFrcHvT0yHFpDTEAMILa++dSYhuDr0rfunAB0j H7YRgoTp+tYibU4aS59XSMnbJzOB+dG6YWQVGqalgYxB7Z4CrJttJgRc/h6hRmjqWm7T 8i338UNFnzZEskAJIOGH0fMY6/rzNlVTWBdplM+/YKytG/sAahVdTMqNun5WO+EFbMIi vLdl59d3pbkbsU+OZ5OMDOzKomjoPg4qdlmXwr/dIdsRroikrD0MDLh4bAoGEc9uJcoU Q425vFEm5NIvt5T+OYBidbGJfZkJpnO+8CW1ZMkp3gFBVNQ/3dMMxHltj0YYohGQpjGY bdag== X-Gm-Message-State: AOJu0YyJiVLZETFwNuSgODBuxIBgEB3bS8oSOiPC2Gft6wzBJ5+5ydK4 Z/RRNo9DeUeMioJ/R8EcpKzU4Q6csxFPk/GwpZkNh8so38fKVagIm7TICQDwmmBobrUsfX4lm1u ycfp/1sRC10Xph7NNmTtgTkqNmK4ED3FZ3bbPt6jkKS+1kcgzRNR5JJwG8qNlVcds85a5mxd6HQ c0zRWoJwI= X-Received: by 2002:a5d:58ea:0:b0:32d:819d:ec75 with SMTP id f10-20020a5d58ea000000b0032d819dec75mr2386189wrd.60.1697842440557; Fri, 20 Oct 2023 15:54:00 -0700 (PDT) X-Received: by 2002:a5d:58ea:0:b0:32d:819d:ec75 with SMTP id f10-20020a5d58ea000000b0032d819dec75mr2386176wrd.60.1697842440162; Fri, 20 Oct 2023 15:54:00 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id b16-20020a5d5510000000b0032d2489a399sm2530010wrv.49.2023.10.20.15.53.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 15:53:59 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Javier Martinez Canillas , Dan Carpenter , Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH] drm/ssd130x: Fix possible uninitialized usage of crtc_state variable Date: Sat, 21 Oct 2023 00:52:57 +0200 Message-ID: <20231020225338.1686974-1-javierm@redhat.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 20 Oct 2023 15:55:02 -0700 (PDT) Avoid a possible uninitialized use of the crtc_state variable in function ssd132x_primary_plane_atomic_check() and avoid the following Smatch warn: drivers/gpu/drm/solomon/ssd130x.c:921 ssd132x_primary_plane_atomic_check() error: uninitialized symbol 'crtc_state'. Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/dri-devel/7dd6ca45-8263-44fe-a318-2fd9d761425d@moroto.mountain/ Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/solomon/ssd130x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c index 32f0857aec9f..e0174f82e353 100644 --- a/drivers/gpu/drm/solomon/ssd130x.c +++ b/drivers/gpu/drm/solomon/ssd130x.c @@ -910,7 +910,7 @@ static int ssd132x_primary_plane_atomic_check(struct drm_plane *plane, struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane); struct ssd130x_plane_state *ssd130x_state = to_ssd130x_plane_state(plane_state); struct drm_crtc *crtc = plane_state->crtc; - struct drm_crtc_state *crtc_state; + struct drm_crtc_state *crtc_state = NULL; const struct drm_format_info *fi; unsigned int pitch; int ret; -- 2.41.0