Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4421737iob; Sun, 8 May 2022 12:10:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1gKt+RVh696HpgKstxvPQLpcfKxV31+5HW1ujmlT0XhQFKD0LXgiJei2IalUjcAKQYWhS X-Received: by 2002:aa7:dd91:0:b0:427:b2c4:1c7a with SMTP id g17-20020aa7dd91000000b00427b2c41c7amr14315685edv.91.1652037038125; Sun, 08 May 2022 12:10:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652037038; cv=none; d=google.com; s=arc-20160816; b=ZE8+hCv/qbCNDCQkpEDqc4bvF4r6mZ9eCXAlWAMtgxvLDOhodsgQbzskqagy63gGfG 47vQe+VeiyqEKHZn97Hv1cp8dg166fCwRqbxGZwiqmQNveMu9QoSNZuCU5k9ygttk9TO xTtZk78bBGFs1HcqI0wl0MyL31BlOd5d/9FOvGHpcG5Z8Dbk/CL6ICH2DK2wi02QrmfA WpWsTx/vOjwEOsRIbPpcVsCxl7DQlMMWfIB93sILChLM54i0nKYwdFUf48Fx7VAIN7hZ M9dKe9fP+JQpiJwlq+tZIHn4Qse7lsaxPBn1bqG+DzGaFTLsUW68AG4h/b/KYsttHhrY 3tRA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/7tXNB+cCvPxruoOrgF7Dgt1DcHSg8JwnxLFZ+sbNs4=; b=j1rCSGRXgYSzCe2XyiECRT0ziFqAhq7PczF7povI4445pgpkGl25RkKhpAhYgHJA8M T8zNHd2PNIjxRE6RKOQGOfF4iHE2LS8ZsH5+tZfiU/VT4+mw/qW7/Yjbz0rbupl7FFMB yMc6YLlbHrKiR1fzbE3PkYzjbBe0RO2nv7rpaL0oUzlv/7H0lTRI78utlp/nM+nfFRb1 JK2OECUTRNzxPdjaVc9O4Tw368OMI9SYHbOpnShx2YP80XCwOeh3maNT+nx6bc5iyFXB cutZqUAjZ8Av5gAUUjfQ77iFHHfH+F0DO8oH7xsf7tyRxocs2nWYGpT8XiEXcnjxeFzg naEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4-20020a1709061e8400b006f39aacdf1asi10741184ejj.538.2022.05.08.12.10.12; Sun, 08 May 2022 12:10:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347883AbiEDJyn (ORCPT + 99 others); Wed, 4 May 2022 05:54:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347832AbiEDJyl (ORCPT ); Wed, 4 May 2022 05:54:41 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 21BCC27B34 for ; Wed, 4 May 2022 02:51:05 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EADE3ED1; Wed, 4 May 2022 02:51:04 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 005013FA50; Wed, 4 May 2022 02:51:03 -0700 (PDT) From: Sudeep Holla To: Cristian Marussi , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Dan Carpenter , kernel test robot Subject: Re: [PATCH] firmware: arm_scmi: Fix late checks on pointer dereference Date: Wed, 4 May 2022 10:50:49 +0100 Message-Id: <165165782039.3475411.4505052280143077810.b4-ty@arm.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220503121047.3590340-1-cristian.marussi@arm.com> References: <20220503121047.3590340-1-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 May 2022 13:10:47 +0100, Cristian Marussi wrote: > A few dereferences could happen before the iterator pointer argument was > checked for NULL, causing the following smatch warnings: > > drivers/firmware/arm_scmi/driver.c:1214 scmi_iterator_run() warn: variable > dereferenced before check 'i' (see line 1210) > > Fix by moving the checks early and dropping some unneeded local references. > > [...] Applied to sudeep.holla/linux (for-next/scmi), thanks! [1/1] firmware: arm_scmi: Fix late checks on pointer dereference https://git.kernel.org/sudeep.holla/c/c7f8852d42 -- Regards, Sudeep