Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH 0/2] Correct Phase Range Check for AD9832 and AD9834 Drivers
@ 2024-11-05 14:03 Zicheng Qu
  2024-11-05 14:03 ` [PATCH 1/2] staging: iio: ad9834: Correct phase range check Zicheng Qu
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Zicheng Qu @ 2024-11-05 14:03 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23, gregkh, cristina.opriceana,
	daniel.baluta, linux-iio, linux-staging, linux-kernel
  Cc: tanghui20, zhangqiao22, judy.chenhui, quzicheng

Hi all,

I am submitting two patches to address an issue in the AD9832 and AD9834
IIO drivers. The current implementation allows an invalid phase value of
4096 to pass due to incorrect range checking. The phase registers for
both devices are 12 bits, meaning valid values should range from 0 to
4095.

These patches modify the condition to use a greater-than-or-equal-to
check, ensuring only valid phase values are accepted.

Zicheng Qu (2):
  staging: iio: ad9834: Correct phase range check
  staging: iio: ad9832: Correct phase range check

 drivers/staging/iio/frequency/ad9832.c | 2 +-
 drivers/staging/iio/frequency/ad9834.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-11-09 14:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05 14:03 [PATCH 0/2] Correct Phase Range Check for AD9832 and AD9834 Drivers Zicheng Qu
2024-11-05 14:03 ` [PATCH 1/2] staging: iio: ad9834: Correct phase range check Zicheng Qu
2024-11-05 15:54   ` Dan Carpenter
2024-11-05 14:03 ` [PATCH 2/2] staging: iio: ad9832: " Zicheng Qu
2024-11-05 16:15   ` Dan Carpenter
2024-11-07  1:10 ` [PATCH v2 0/2] Fix phase range check in AD9832 and AD9834 drivers Zicheng Qu
2024-11-07  1:10   ` [PATCH v2 1/2] staging: iio: ad9834: Correct phase range check Zicheng Qu
2024-11-07 10:32     ` Dan Carpenter
2024-11-09 14:41       ` Jonathan Cameron
2024-11-07  1:10   ` [PATCH v2 2/2] staging: iio: ad9832: " Zicheng Qu
2024-11-09 14:39   ` [PATCH v2 0/2] Fix phase range check in AD9832 and AD9834 drivers Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox