Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: ac558015dfd8 ("ASoC: SDCA: add a HID device for HIDE entity")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507221024.M18hWD6q-lkp@intel.com/
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250722114705.2816910-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Charles Keepax and committed by
Mark Brown
246570cd 59c5dbd5

+1 -1
+1 -1
sound/soc/sdca/sdca_hid.c
··· 24 24 unsigned int rsize; 25 25 int ret; 26 26 27 - rsize = entity->hide.hid_desc.rpt_desc.wDescriptorLength; 27 + rsize = le16_to_cpu(entity->hide.hid_desc.rpt_desc.wDescriptorLength); 28 28 29 29 if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) { 30 30 dev_err(&hid->dev, "invalid size of report descriptor (%u)\n", rsize);