Skip to content
Commit 6e6644c0 authored by Aleksa Savic's avatar Aleksa Savic Committed by Greg Kroah-Hartman
Browse files

hwmon: (corsair-cpro) Use a separate buffer for sending commands

[ Upstream commit e0cd85dc ]

Introduce cmd_buffer, a separate buffer for storing only
the command that is sent to the device. Before this separation,
the existing buffer was shared for both the command and the
report received in ccp_raw_event(), which was copied into it.

However, because of hidraw, the raw event parsing may be triggered
in the middle of sending a command, resulting in outputting gibberish
to the device. Using a separate buffer resolves this.

Fixes: 40c3a445

 ("hwmon: add Corsair Commander Pro driver")
Signed-off-by: default avatarAleksa Savic <savicaleksa83@gmail.com>
Acked-by: default avatarMarius Zachmann <mail@mariuszachmann.de>
Link: https://lore.kernel.org/r/20240504092504.24158-2-savicaleksa83@gmail.com
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f3c1bf30
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment