From nobody Sat Oct 4 19:17:47 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D5AAF2E612A for ; Wed, 13 Aug 2025 13:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755090442; cv=none; b=I3RbeIY53vfXIryHYkRwExCucKmEDrhZ1nEOuDA1D98yL1dXR/QqiTpx8J7jLHB02OYHrDm/+n3dkQJ3kMhVcSHZvzBUrICQ9zaUUHoT/NpR96UDgEQXhEKeR+cPDvUQ1Iyf6uSWEjYQ3uYPwTdnkV2A8gaCsxDAv1/IoE8lZlA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755090442; c=relaxed/simple; bh=HABmKtOhnt8GVLNByBQ/IS/82617YDraMxjzx2yP0i0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mp/dabR18Rr6utXKtoz/BsD2S1dUn1Dtf8NYNC+S72xYEzvABJSC7pll44nvX1cmTiidd269S4X3P5XnPmQ7V4sx6Wy0XSXCWgs4Bw8iS2ItQr0/dEHyMfdcI434+s4rMQONOkGkkwaWlDvLNCe2NvdHIKU6UapLThgF/WfZIik= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEBD4C4CEEB; Wed, 13 Aug 2025 13:07:20 +0000 (UTC) From: Geert Uytterhoeven To: Mark Brown , Greg Kroah-Hartman , "Rafael J . Wysocki" , Danilo Krummrich , Marek Vasut Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] regmap: Remove superfluous check for !config in __regmap_init() Date: Wed, 13 Aug 2025 15:07:18 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 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 first thing __regmap_init() do is check if config is non-NULL, so there is no need to check for this again later. Fixes: d77e745613680c54 ("regmap: Add bulk read/write callbacks into regmap= _config") Signed-off-by: Geert Uytterhoeven --- drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 1f3f782a04ba23a9..6883e1a43fe5d7af 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -827,7 +827,7 @@ struct regmap *__regmap_init(struct device *dev, map->read_flag_mask =3D bus->read_flag_mask; } =20 - if (config && config->read && config->write) { + if (config->read && config->write) { map->reg_read =3D _regmap_bus_read; if (config->reg_update_bits) map->reg_update_bits =3D config->reg_update_bits; --=20 2.43.0