diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index c970e4b7b8..2a891f4f0c 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -457,14 +457,18 @@ public:
 		val->set<T>(value);
 	}
 
-	template<typename T, typename V, size_t Size>
-	void set(const Control<Span<T, Size>> &ctrl, const std::initializer_list<V> &value)
+	template<typename T, size_t Size>
+	void set(const Control<Span<T, Size>> &ctrl,
+		 const std::initializer_list<std::remove_cv_t<T>> &value)
 	{
+		if constexpr (Size != dynamic_extent)
+			assert(Size == value.size());
+
 		ControlValue *val = find(ctrl.id());
 		if (!val)
 			return;
 
-		val->set(Span<const typename std::remove_cv_t<V>, Size>{ value.begin(), value.size() });
+		val->set(Span<const T, Size>{ value.begin(), value.size() });
 	}
 
 	const ControlValue &get(unsigned int id) const;
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index 1e1b49e6bd..90f89947ce 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -1074,7 +1074,8 @@ bool ControlList::contains(unsigned int id) const
  */
 
 /**
- * \fn ControlList::set(const Control<Span<T, Size>> &ctrl, const std::initializer_list<V> &value)
+ * \fn ControlList::set(const Control<Span<T, Size>> &ctrl,
+ *                      const std::initializer_list<std::remove_cv_t<T>> &value)
  * \copydoc ControlList::set(const Control<T> &ctrl, const V &value)
  */
 
diff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp
index e27325c30c..0e6b0bd27c 100644
--- a/test/controls/control_list.cpp
+++ b/test/controls/control_list.cpp
@@ -246,6 +246,20 @@ protected:
 			return TestFail;
 		}
 
+		ControlList list2;
+
+		/* Check deduced type of init list */
+		{
+			const auto &ctrl = controls::FrameDurationLimits;
+
+			list2.set(ctrl, { 1, 2 });
+
+			if (list2.get(ctrl.id()).type() != static_cast<const ControlId &>(ctrl).type()) {
+				cout << "Type of init list has been incorrectly deduced";
+				return TestFail;
+			}
+		}
+
 		return TestPass;
 	}
 };
