Unverified Commit 246570cd authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown
Browse files

ASoC: SDCA: Fix implicit cast from le16



As the HID wDescriptorLength is explicitly marked as little endian it
should be converted to host endian before being used.

Fixes: ac558015 ("ASoC: SDCA: add a HID device for HIDE entity")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507221024.M18hWD6q-lkp@intel.com/


Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250722114705.2816910-1-ckeepax@opensource.cirrus.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 59c5dbd5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ static int sdwhid_parse(struct hid_device *hid)
	unsigned int rsize;
	int ret;

	rsize = entity->hide.hid_desc.rpt_desc.wDescriptorLength;
	rsize = le16_to_cpu(entity->hide.hid_desc.rpt_desc.wDescriptorLength);

	if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) {
		dev_err(&hid->dev, "invalid size of report descriptor (%u)\n", rsize);