Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp842226rwe; Fri, 14 Apr 2023 10:21:05 -0700 (PDT) X-Google-Smtp-Source: AKy350bOggRgwi3zXBDT4JV7V7rQeXBvirWGo66gdpReRMgNbfYoIy897yrYGhRBe5/o/rsKV2fJ X-Received: by 2002:a05:6a20:8f0e:b0:ee:4210:6ca with SMTP id b14-20020a056a208f0e00b000ee421006camr3405138pzk.7.1681492864849; Fri, 14 Apr 2023 10:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681492864; cv=none; d=google.com; s=arc-20160816; b=HcUOZRgGSUHpphqkkUUJeAW9rm5EPVKMYdDcPWu/mtGjM1J/UcjWRYZv+P3Y/jZx/Q 3rBtMqziQow1xW6UU1IUw2WEcFzjHIW1OChW8DCGhnrtOycGfqxhCHpNRlYAxncYOQDj 6o5uvF4DDvsjnsA/sUPmU6PWU1KwrnIc1hl/24pyhTSgUA2rcF610JkseS11Vwxao6K/ nV8LXulGqvCCVD0lIB2d6Zr/LTnPVm+bQ5XpQTgT5G+wKXdy2pbQcZOXnwHhhblUh8Db +mvn2gcY9qDPM7jcGZ6HNL27Uo0p9LGHFatOMQhwEdyhTgWqIqo6GpHKzBUcqJAde5gZ 5lIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=YnIiF3uwZzxuuxIUmhy9AHWO63LwfXbyswyzNVMsOQ4=; b=MVQ91GiG0JEfjQnMf4iTdz+M50rUGOsl/ZFC+LcKD1+M9R52UBxBruTlxPjeFI/l8Z JhfuJF1qjbBK31WlMg7p3OgzKra3PWVwc0WKJN9F5iY6M0UmJoznxnja0kvSsnPUgMhx r53f3u9otEWeiPrHmCMyPqaZs9NsA9pFpBzmOLYIwF8P07ANUZN09CgjBthxpUY56ABo 3fACYhUNLqUByLBGpVL3bZpSEKFXS5LuX/m9k3jrJTYzg2pREgPzZ24RzNGbbL8svLtW ETUjErCId2DtwjoQCx+72DaCRHvcUEufA4mTJLYeHxCde8mIU9P6qMveh44UslFI7IYy l77g== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u64-20020a638543000000b005023dfa3c68si5332141pgd.145.2023.04.14.10.20.52; Fri, 14 Apr 2023 10:21:04 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230313AbjDNRNa (ORCPT + 99 others); Fri, 14 Apr 2023 13:13:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229805AbjDNRN3 (ORCPT ); Fri, 14 Apr 2023 13:13:29 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84E4E26AB; Fri, 14 Apr 2023 10:13:28 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10680"; a="409720692" X-IronPort-AV: E=Sophos;i="5.99,197,1677571200"; d="scan'208";a="409720692" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2023 10:13:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10680"; a="779249884" X-IronPort-AV: E=Sophos;i="5.99,197,1677571200"; d="scan'208";a="779249884" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP; 14 Apr 2023 10:13:24 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pnMzC-00HDU9-0N; Fri, 14 Apr 2023 20:13:22 +0300 Date: Fri, 14 Apr 2023 20:13:21 +0300 From: Andy Shevchenko To: Markus Elfring Cc: kernel-janitors@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, Greg Kroah-Hartman , Hans de Goede , Hans Verkuil , Mauro Carvalho Chehab , Sakari Ailus , Xiaomeng Tong , cocci@inria.fr, LKML Subject: Re: [PATCH] media: atomisp: Move a variable assignment behind a null pointer check in atomisp_cp_general_isp_parameters() Message-ID: References: <40c60719-4bfe-b1a4-ead7-724b84637f55@web.de> <1a11455f-ab57-dce0-1677-6beb8492a257@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL,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 Thu, Apr 13, 2023 at 10:20:15PM +0200, Markus Elfring wrote: > Date: Thu, 13 Apr 2023 22:08:42 +0200 > > The address of a data structure member was determined before > a corresponding null pointer check in the implementation of > the function “atomisp_cp_general_isp_parameters”. > > Thus avoid the risk for undefined behaviour by moving the assignment > for the variable “cur_config” behind the null pointer check. I don't think this is what is happening here. The check might be removed by optimizer in the compiler. > This issue was detected by using the Coccinelle software. > > Fixes: ad85094b293e40e7a2f831b0311a389d952ebd5e ("Revert 'media: staging: atomisp: Remove driver'") Wrong tag format. Code-wise I'm not against this, but it's up to Hans. -- With Best Regards, Andy Shevchenko