i2c: aspeed: fix invalid clock parameters for very large divisors
The function that computes clock parameters from divisors did not respect the maximum size of the bitfields that the parameters were written to. This fixes the bug. This bug can be reproduced with (and this fix verified with) the test at: https://kunit-review.googlesource.com/c/linux/+/1035/ Discovered-by-KUnit: https://kunit-review.googlesource.com/c/linux/+/1035/Signed-off-by: NBrendan Higgins <brendanhiggins@google.com> Reviewed-by: NJae Hyun Yoo <jae.hyun.yoo@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
Showing
想要评论请 注册 或 登录