From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383866; b=gZeOLxdHDEc3npI8CvHSZ0Hfowrm+xNkDGjY1l0vJVPlm7JesaByLo08ZnQpVPAKke7/ d+AqG835dwtDAXBE46Zx9QKStd+aa5olBXCzcCb4JCPGiC+5ow2V18hwgW/TEd+hYHYF8 OCFe5MPUXgiSBg6j/kp3Q/6Yf5QWeeOTST4y2TEJqsiT+QNQmagCE/iTbdcPA/4Qvd/q2 Cvs9COQ+/nicVTPjOUVpT3TTwNCImF6UQr8O2YJGxyhQu6MtQ57QmiQjTbFDHf5a4G9Y5 BL4kkccndg18deULOBgWt3u4Plc6AOs150XEG4JpLysoL/3gTjmnxEG+EHmmTbEwi4g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383866; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=bA75o1nzUydZd3rToQX51tnexhtBQUCCUGc3wB/ogeM=; b=r4JCqZ4GdIP6MmBmsyL7i6kUa1OwOuGE8uzoYmiQx++v6zOVb8D+dz7Pow1vhmwoqevw LFtScuHTyqdwmCR8Zo7VgFOA74wUiEEdW1jyIGZiKtnbxA+3tZzxQMFmRK0xNfuyuP5Sr Nr74GzswzdGCHTA18rfrz/IQ0EidZfr3FzwnDyG3aivagBCOwkqXXPZvROWg3chK/PiXP dY/dlp4qwCd9kDygRsnTIBUvZI1m/5MRchmUEXzdluwUd6fB87YMfoBZ0bdXCmhaKcd3Y D/EPMBDhwQwSN3MNpd7ZOUvxekW3PhAOdHxeP1ytStwmPTQchjtoNotPjEzkLYfiwFQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="B1iR/c5d"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9468606A335; Fri, 4 Dec 2026 11:31:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=B1iR/c5d Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3C111F00897; Fri, 4 Dec 2026 11:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383866; bh=bA75o1nzUydZd3rToQX51tnexhtBQUCCUGc3wB/ogeM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=B1iR/c5dCLWL+Ob9NSEdNdmg8zOTQu2nVgh5epSy8efAdJFFfuhA1+ROjnbMopSi/ uG+Frm0D/ZFbZ1UFAXmLwb+jC6kFvCChGQaZLz8Dany5lOlHyZ11OxMdvTAMw/VR2d rWblFWRcTn19fWBmcwWqIiXYPvN4GMB95QPE4hpU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ivan Verbovoy , Dmitry Torokhov Subject: [PATCH 6.12 400/555] Input: da7280 - do not advertise FF_GAIN Date: Fri, 4 Dec 2026 19:07:23 +0900 Message-ID: <20261204100624.848590376@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ivan Verbovoy commit c1f4db7e869ce7dafd1811a75b392740985e1199 upstream. The driver sets FF_GAIN in the device's force feedback capabilities but provides no set_gain() callback. input_ff_event() checks the capability bit, not the callback, before calling ff->set_gain(), so an EV_FF/FF_GAIN event written to the event node by any process with write access to it calls through a NULL pointer. The driver has no global gain to set: a constant effect carries its own level, and a periodic effect plays a pattern from the device's waveform memory. Drop FF_GAIN from the capabilities, so that input_ff_event() ignores such an event. Fixes: cd3f609823a5 ("Input: new da7280 haptic driver") Cc: stable@vger.kernel.org Signed-off-by: Ivan Verbovoy Link: https://patch.msgid.link/20261109-da7280-fixes-v1-1-09cc3650261c@gmail.com Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/da7280.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/input/misc/da7280.c +++ b/drivers/input/misc/da7280.c @@ -1227,7 +1227,6 @@ static int da7280_probe(struct i2c_clien input_set_capability(haptics->input_dev, EV_FF, FF_PERIODIC); input_set_capability(haptics->input_dev, EV_FF, FF_CUSTOM); input_set_capability(haptics->input_dev, EV_FF, FF_CONSTANT); - input_set_capability(haptics->input_dev, EV_FF, FF_GAIN); error = input_ff_create(haptics->input_dev, DA7280_FF_EFFECT_COUNT_MAX);