Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2961994pxy; Tue, 3 Aug 2021 21:34:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6+xorgYA2LctniQSuylfQ12SEDevtsR6V7nbt/gBWHNRrVqAAcPho/asdeHGRCjlRKBz2 X-Received: by 2002:a92:db4b:: with SMTP id w11mr49605ilq.297.1628051686815; Tue, 03 Aug 2021 21:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628051686; cv=none; d=google.com; s=arc-20160816; b=AtMauyKjE4hzUdsdvb6MQlCSnNXNLViLah0v+vJ0ciMyuG/flFiP7+EF8tWlpLRsKl EbdlCFV9yTuxf9IQEQatdZeApwNeUWmYLBLRsi05ne378hY/BLPfDZIF5O2lik3P8NMi qbal43xw/JlDOOdJRrTBAJTjUFRIZ5FxP9I+DG1ofcDdIGSIwynBMgGzynUJl76Yn6Uo 2m2z83D/tsGyW5K8Hf5YPXnJ8eGAwnSW1hObEO6NfbopWWUzNXe/uPUC/E9JQYx+Oxy1 ZDSZItdR5xg2u3ooTVcY5zlx0wgsUDX5iui+69KDfLNdXjkSkq/nLXEpLlHvZADbIsov CjGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ZB8hSYRKOrLl+E7loPd/8HK8c+ZXrxlOogYwUY2eSfs=; b=gMfDf0aXVm6nFSJw01UG4ubIVavncvr0UEljmcE7lt65yXR/R8Qj5OFVIEAjPBtObm mpSIwundXCD6OOmMPcG2rNWnt6eKD81qehRTans7GxeL4FE1pyNvANooFmd27P2XDLsq CFpCitzHku9ZQPbWdgiteJQRvKJ5O8N9PqcaB1XrEKww+TJfr/+PHkjhNbrmuOMY+q46 +zR0oEBOGv35i/NC3O/sc1Vgm/YViC3a4kolBtjfMWL/nSquHp/c6t4QJd5PBpxtUioR dqKxDuoNc5t87KU8jKU8IPQbWB9yBbqaKzk4lVfafL00NqnviAIHpSuy6cyCrAxEVzLo BNqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xuIYEBsn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si1311853ilg.4.2021.08.03.21.34.34; Tue, 03 Aug 2021 21:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xuIYEBsn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229379AbhHDEDA (ORCPT + 99 others); Wed, 4 Aug 2021 00:03:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbhHDECv (ORCPT ); Wed, 4 Aug 2021 00:02:51 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4317C061798 for ; Tue, 3 Aug 2021 21:02:39 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id q17-20020a17090a2e11b02901757deaf2c8so1833894pjd.0 for ; Tue, 03 Aug 2021 21:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZB8hSYRKOrLl+E7loPd/8HK8c+ZXrxlOogYwUY2eSfs=; b=xuIYEBsn2ryqdGX+FkuwetInmokALqieaEGMa8kT90J0hA64MKJqN0LJ878I/0lb0v tkhcV8blLh+C1rmWsmvy+Aux/jdhiT9Z2rmcDr7uPC1+pfCN/TZGCpfWTV0diARD4xwW UItWZf4bsjcUCjL2MGH5HHjx8MZY17xbW0F97PHlpCMA5NvJM5uemsbs9K81DN50Eu5A XzbRGMyFC8HsaYITWy9qRAGTQ3aa158OQn+jl4R4IlsMlUWJ2m4LjsxYsCN0UCHOnM2/ 4aCgBGoeHSX9jDDlyxsLDysGL9MslKaWc4w2pOpAODcJrvOQigULv7OqP4th2UBSFISU hbfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZB8hSYRKOrLl+E7loPd/8HK8c+ZXrxlOogYwUY2eSfs=; b=jxQWRl+ba7kC5pkfx+ea0gSVc7FY6GFx15pVvXmpuNvhrzs44bNEEL0vUxbwGXccHo vfTs9oDIA8szWz5HEtQXovf+czsew5isf8oWdQJzAEXJpPwWZNfuQ7q2PzLATIOFzhT0 DZEPmTc/pPg4z+lhbSdfgnHmF8kOMgmlcMwEjOGSm4UXQcyI/BkuPFc6TNieC+ryAwCF 2nHHWlaM/4cdHwr6B3P+xBB6tDUKQjw9Cdc9ypI8r+gxgAbPPIVKzYtbX+x/0CTXvdj+ ev2VCc01EfDzjpVEEa7uPvI/nPuv+eSunOQAgiGGsrm/7FDGWjVEPcuBxlA126m28smX w3xg== X-Gm-Message-State: AOAM530ylvoZ/ixA4M2TiGbNBkMMHAGi4z24t9Omo0WzKdJjcjgOvHMd +NtcJZKR6sKHJcxp8pXsQZAMgw== X-Received: by 2002:a17:902:ce8f:b029:12c:c4e7:682d with SMTP id f15-20020a170902ce8fb029012cc4e7682dmr7288244plg.58.1628049759151; Tue, 03 Aug 2021 21:02:39 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id g20sm723281pfv.88.2021.08.03.21.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 21:02:38 -0700 (PDT) Date: Wed, 4 Aug 2021 09:32:37 +0530 From: Viresh Kumar To: Lukasz Luba Cc: linux-kernel@vger.kernel.org, sudeep.holla@arm.com, cristian.marussi@arm.com, rjw@rjwysocki.net, nicola.mazzucato@arm.com, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v2] cpufreq: arm_scmi: Fix error path when allocation failed Message-ID: <20210804040237.ssrba26jpe572mjf@vireshk-i7> References: <20210803090744.12143-1-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210803090744.12143-1-lukasz.luba@arm.com> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03-08-21, 10:07, Lukasz Luba wrote: > Stop the initialization when cpumask allocation failed and return an > error. > > Fixes: 80a064dbd556 ("scmi-cpufreq: Get opp_shared_cpus from opp-v2 for EM") > Signed-off-by: Lukasz Luba > --- > changes: > v2: > - removed dev_warn() since it's not needed in this case > - adjusted the patch description > > drivers/cpufreq/scmi-cpufreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c > index ec9a87ca2dbb..75f818d04b48 100644 > --- a/drivers/cpufreq/scmi-cpufreq.c > +++ b/drivers/cpufreq/scmi-cpufreq.c > @@ -134,7 +134,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) > } > > if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL)) > - ret = -ENOMEM; > + return -ENOMEM; > > /* Obtain CPUs that share SCMI performance controls */ > ret = scmi_get_sharing_cpus(cpu_dev, policy->cpus); Applied. Thanks. -- viresh