From nobody Wed Feb 11 08:11:34 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FAF83876DA for ; Tue, 10 Feb 2026 16:11:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770739864; cv=none; b=rSroeJmhOsh01DMxsnk2wJmezpAZ9AoTJUdhHMHixzb6nxa8wfUbehQtZCeMEIPFVefvVSj2l/jhfQn+sowc+RpyqHGc4/YYjTAeSDVAvYyHy0fKa0nSC1tZdKBpJde/tezd7q60Pek6stjzhpaIxA7GJgS1U+qj9EG1t4xEXmA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770739864; c=relaxed/simple; bh=Pij1BCxIuUcJcvCONBtKxEesYOPuFGV6EqQUt+PxPaU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WdWNadhx3ahD5rmDe1ZRe+ZFvGK8nf+mdu49Xc/ydp1mOn1Mluvv91oTY7yWccl98YUtT74sYWigPAaBKAGjVqvcTXruOXyx9In34JjXd1Pe50t10nHBnN0Bu0rlXyikqMBuEYXIQdhTdoR++uiqylZUguT9uzg4dJZ7u4+6Avo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QRcc/ewN; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QRcc/ewN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770739864; x=1802275864; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Pij1BCxIuUcJcvCONBtKxEesYOPuFGV6EqQUt+PxPaU=; b=QRcc/ewNzdwI5YVGGUP6/Lk3XHZnaEH67k70TUWYbzpxRpl1HpPLdcaD Jf0kyIqbiQIPLsBDa7D8fp5GSTZSAG7l5sdlgDh0YWdmlVm/fyhX4L/c/ 8ljnD4SHgOaghOLJrDIWToi5e4jscnG3Fcn8FrxpuX53dVuoyTgM+q08T s9ynHq6ONZ3cq3GbkYeG2sPhLtKfCHMlDEZAWXx51lyT4/72hMyH3thtq 392YvyV0NqGBsJmq68sC1xtZh1amB0SuY9RY+qRqh85+i2FYDNnLOZv29 SORhMBhF+vLdRYrFrw3cKvDo7z87A7NXERs/7iyvFwBogC5KFEyx0g0F0 A==; X-CSE-ConnectionGUID: +yPsUqygTUqD15hnDN2CcA== X-CSE-MsgGUID: iUTQMbbXTVm8XcKxYSOHBA== X-IronPort-AV: E=McAfee;i="6800,10657,11697"; a="94514479" X-IronPort-AV: E=Sophos;i="6.21,283,1763452800"; d="scan'208";a="94514479" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2026 08:11:01 -0800 X-CSE-ConnectionGUID: 8cPkGP4XQtuy0xFAp7ueMA== X-CSE-MsgGUID: y6C3QHubTPCJzBUHiQlJMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,283,1763452800"; d="scan'208";a="211594024" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa008.fm.intel.com with ESMTP; 10 Feb 2026 08:10:59 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 7AE1F95; Tue, 10 Feb 2026 17:10:58 +0100 (CET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org, Oleksij Rempel Cc: Mark Brown , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich Subject: [PATCH v1 1/3] regcache: Remove duplicate check in regcache_hw_init() Date: Tue, 10 Feb 2026 17:09:08 +0100 Message-ID: <20260210161058.53093-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260210161058.53093-1-andriy.shevchenko@linux.intel.com> References: <20260210161058.53093-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The regcache_hw_init() is never called without preliminary check for num_reg_defaults_raw not being 0. Thus, remove duplicate in the function. Signed-off-by: Andy Shevchenko --- drivers/base/regmap/regcache.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 319c342bf5a0..1d55f43ff081 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -50,9 +50,6 @@ static int regcache_hw_init(struct regmap *map) unsigned int reg, val; void *tmp_buf; =20 - if (!map->num_reg_defaults_raw) - return -EINVAL; - /* calculate the size of reg_defaults */ for (count =3D 0, i =3D 0; i < map->num_reg_defaults_raw; i++) if (regmap_readable(map, i * map->reg_stride) && --=20 2.50.1