From patchwork Thu Apr 25 16:58:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13643570 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 413F9C10F15 for ; Thu, 25 Apr 2024 16:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/IEJQD8eYKI4BqWiaw1PIylmSG013BumCv3ChbhB5eQ=; b=y29wqUtd+BF8Hh R/xh63XvXMr152q/za40on9hDYZOMnkHYO6di7XYoRsiFO4ZKXl4GYeerKS8L00ckhJJylgMx5C/e uGVweW/sCfQ2Q3hwLMQjNsffeLwyLlSutA03NPvo/oquhU0ImFWkdVPiGbXC6QIrIZhxWUQt2zpo7 Nt7O8OIRG39CC8xkrLxzcJX5ZdwXbIgssCVacY4jMCASGsSQSgdu8zLcynbrfERJm+u/Ycd+40LQ+ 7xs1K9wjKTmW2j7HCdcEFquS9+rvR4Tp/uILphj5Zbo4O8u6x0nYZbfESA9nj4D68rYtnAujbgfBc Y20kkNQFFwMbP7b/mW2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s02Rj-00000009TyI-31UN; Thu, 25 Apr 2024 16:59:43 +0000 Received: from mout.gmx.net ([212.227.15.18]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s02RN-00000009ToR-0pq6 for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2024 16:59:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1714064354; x=1714669154; i=wahrenst@gmx.net; bh=h7WL1l3kzh5o9Rl4X2yF/GPxgKaU9BKPZn/MU+snOYU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=IC/BsgY9KWEsdM5qNz7NE1GeJ3uSMJluicQJFzKQd9n4434yEJBA+P6ZNJWh4Evn awrJyjS1uKyfyQqBgHnKjmD8UsOVonIUtkqVDsvAJkcD6EHSvDL+hG3n4nlYpB6la S2i4iWn8Iqy8SIErt+RpJnzk+lPwmAfsTPuFAX2aEHCqWREetJQdX9ywsPrj16o/U TQ9L2UnrKdMakSAUcWJMe/2ETNs2mbsUgfn6si0SzKwkiZFcbjw/X0+rNcpC34J1T JANr+nXrdkI9xj8Y0SbHp0UnYRFJCKZiRa3V2TtS8m1i3D8Y1KHeAcpJgUxqGzMES zKNiPovNf4K7lSA5TQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N3se2-1si04g21nE-011YR4; Thu, 25 Apr 2024 18:59:14 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli Cc: Umang Jain , Laurent Pinchart , linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Stefan Wahren , kernel test robot Subject: [PATCH V2 1/5] staging: vchiq_arm: Drop unnecessary NULL check Date: Thu, 25 Apr 2024 18:58:48 +0200 Message-Id: <20240425165852.6681-2-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425165852.6681-1-wahrenst@gmx.net> References: <20240425165852.6681-1-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:KiUUZ5NMFofHqLqChs85AYuddbYy1L3UO5tmdxsBl6/R+c+Pz8i lsZ+8MbLWCvshmxhtfneJh/36wpDWezhAj3Epb1nk6FJHRz4zw6Dnsg/BLDXMnJ2chNG7nH N9ZNliiu9hOmY0AG/ekl72gs6bA+oLzHQ8GEH1QJm1bEEjymc4CWPcK8ASmQhILeqArhAi7 xfYAJtvFW6WEdzgp+kV8Q== UI-OutboundReport: notjunk:1;M01:P0:Kf2NzxddZa8=;83rBTtOAcEo5uJKhI4e3Zose7kn tR+0Wh4T9/Da4F6CdboeuSwKdoLAO1jz3UWaVG3v4OW9K21+yVOzWXTsjNd613bv10Jt1S5cm J6z8U8C7JUMK40aepxAmt2cvEwTv+d/EAbW0cfRWxpiMVQ/UodY0qftrNHZjgca0QaxXBWcTJ v1eTe96Ehpr8h8XXc4LDQ/0GUvgX1ZWUDiExqPGpYGMaRuCcc79Xb0k3WNo29qYQxaw/Wh9v6 mNHf3qjsmuAw/hd98XHg+kInIf46BumAIkMhAEty4XeV0qGlWnO8SGPCLIDt/cRypYZ0/30ke jMVShTJsgZj/J/oGdg0j51NFm5S5OzBqg+lwlVhC5eRGmjnZppdYVufAZP9hdfg4nr+WRKprV qRQG+w2z5iS/dr7coYwoWoWOfE4Cp/ARTjVB2LX+pGZyyg0vMQA33vaEzzhVGzlYu8NYMHuDN +72rCWfxgfd1jLyVgexPFMO7Vw0NWCUlEu1GfRWyL5HxVNQw65b9Ji5XukU2nqZFjlHJwIc+K Bhk7A45XQdYJMMbvW8U6e0aMOmlmp9zHGGt5+u7g9CwSZYnmAfbwockWfUO/t2hnpMu5BJ9sz fU9BN4ykgV2cYA4plANJFLREev26L5nKUVOMQvadHiw/vy6d2FBxakcbEbiy6y3SrCQguwf6U B0lW+MwCB/1mpfE8EXTcwLU2+D86XUkOSk8O+JbciLraR69ysJQdVfU5Bg6kHx0E3Brh5B9G5 KqWF5jLB/jKlUOncDaMAp36fY+sXEU8pvCf8tbtHKNCPNNgkAS+KXK5cXCjbslTZf7BiWWn68 JRR+cEdFZsDOdnXmXpOlULSyCNodXw0dmow+jnN9uGDBg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240425_095921_570475_F71F588D X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Looking at the handling of service instance within the VCHIQ driver shows that it's not possible that service_callback is called with instance is a NULL pointer. So drop the unnecessary NULL check and fix: vchiq_arm.c:1109 service_callback() warn: variable dereferenced before check 'instance' (see line 1091) Reported-by: kernel test robot Closes: https://lore.kernel.org/linux-arm-kernel/202404230315.vx7ESZ3r-lkp@intel.com/ Signed-off-by: Stefan Wahren Reviewed-by: Umang Jain --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index c06232fcb0fb..297af1d80b12 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1106,7 +1106,7 @@ service_callback(struct vchiq_instance *instance, enum vchiq_reason reason, user_service = (struct user_service *)service->base.userdata; - if (!instance || instance->closing) { + if (instance->closing) { rcu_read_unlock(); return 0; }