Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp439932rdb; Wed, 17 Jan 2024 06:45:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjb8OMTCoR7IOhfY+Mw+l8ABFkroYzRAG+xj+k/SFxLnMv+q6MUjSYVmXfZxfmA3QmCdaf X-Received: by 2002:ac2:560b:0:b0:50e:bfba:9e81 with SMTP id v11-20020ac2560b000000b0050ebfba9e81mr3992584lfd.62.1705502733178; Wed, 17 Jan 2024 06:45:33 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d8-20020a170906174800b00a2d4e52c6f2si3865775eje.126.2024.01.17.06.45.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:45:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29091-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-29091-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29091-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E29A01F250B2 for ; Wed, 17 Jan 2024 14:45:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51A3C208D4; Wed, 17 Jan 2024 14:45:24 +0000 (UTC) Received: from exchange.fintech.ru (exchange.fintech.ru [195.54.195.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BE4B13FFF for ; Wed, 17 Jan 2024 14:45:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.54.195.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705502723; cv=none; b=J1rzQc3Rp9+SEY9y6WWekVhx/rT5So91gIAzpFSn4TB3SeicNm0yoZ9gIBU1lFDNps2Bn4XBJsP4kXoGB6j0+5juoMCYn/OhqTI4Ywbl9jhjK9sXiVwGuNAhKXF8r2wlI+CxRyUcMerZyZRFz7zvTB28zKjZ7fCNo5Q3JF/MEBQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705502723; c=relaxed/simple; bh=pVtzEC06dXxKFlIy01Eu9vNzdWCG7elETsLk71Q3Otk=; h=Received:Received:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=t9KxAWI5w0H4GxDa5Zjm0fmpGTLqTB7+HN/fXeAzSWYk1EduCQXICEKUAyUXYIzTJHOOWhCWMMU8ve9tQKItXnC2B5PoB0R1o3ch9bzSKZW66Q5yKYlsO7peVC8PzMIkFHG2BPR6qd+Qu7E/9jWALg0XrrS8sD1qpa1/agAi9ik= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru; spf=pass smtp.mailfrom=fintech.ru; arc=none smtp.client-ip=195.54.195.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fintech.ru Received: from Ex16-01.fintech.ru (10.0.10.18) by exchange.fintech.ru (195.54.195.169) with Microsoft SMTP Server (TLS) id 14.3.498.0; Wed, 17 Jan 2024 17:45:18 +0300 Received: from localhost (10.0.253.138) by Ex16-01.fintech.ru (10.0.10.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 17 Jan 2024 17:45:18 +0300 From: Nikita Zhandarovich To: Alex Deucher CC: Nikita Zhandarovich , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , , , , Subject: [PATCH] drm/radeon/ni_dpm: remove redundant NULL check Date: Wed, 17 Jan 2024 06:45:14 -0800 Message-ID: <20240117144514.11007-1-n.zhandarovich@fintech.ru> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: Ex16-02.fintech.ru (10.0.10.19) To Ex16-01.fintech.ru (10.0.10.18) 'leakage_table' will always be successfully initialized as a pointer to '&rdev->pm.dpm.dyn_state.cac_leakage_table'. Remove unnecessary check if only to silence static checkers. Found by Linux Verification Center (linuxtesting.org) with static analysis tool Svace. Fixes: 69e0b57a91ad ("drm/radeon/kms: add dpm support for cayman (v5)") Signed-off-by: Nikita Zhandarovich --- drivers/gpu/drm/radeon/ni_dpm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c index 3e1c1a392fb7..e08559c44a5c 100644 --- a/drivers/gpu/drm/radeon/ni_dpm.c +++ b/drivers/gpu/drm/radeon/ni_dpm.c @@ -3103,9 +3103,6 @@ static int ni_init_simplified_leakage_table(struct radeon_device *rdev, u32 smc_leakage, max_leakage = 0; u32 scaling_factor; - if (!leakage_table) - return -EINVAL; - table_size = leakage_table->count; if (eg_pi->vddc_voltage_table.count != table_size)