summaryrefslogtreecommitdiff
path: root/scripts/git.orderFile
diff options
context:
space:
mode:
authorJunjie Cao <junjie.cao@linux.dev>2026-08-04 11:02:54 +0800
committerLee Jones <lee@kernel.org>2026-08-12 13:15:00 +0100
commit3d142b19b09ea62d6e9a33d46d1b858b3ad05707 (patch)
tree234066e15232b884f10cd8cdb4b1db062cd70149 /scripts/git.orderFile
parentdaf120e464386f750b3870dc04d5bc6a786f0000 (diff)
downloadlinux-3d142b19b09ea62d6e9a33d46d1b858b3ad05707.tar.gz
linux-3d142b19b09ea62d6e9a33d46d1b858b3ad05707.zip
backlight: aw99706: Validate all DT property values consistently
The lookup helpers for dim-mode and ramp-ctl take a shortcut when lookup_tbl is NULL: they accept any u32 value without range-checking and return success unconditionally. Out-of-range values get silently truncated by regmap_update_bits instead of triggering the dev_warn + default-fallback path that the other properties use. Add a field-width check for the NULL-table case so that values exceeding the register field maximum are rejected the same way a table-lookup miss is. The switching frequency table has a second hole: reserved slots use 0 as their marker, so "awinic,sw-freq-hz = <0>" matches slot 0 and programs a reserved encoding. Make the reserved marker U32_MAX and skip such slots during lookup. While here, also switch the error returns to -EINVAL for consistency. Fixes: 147b38a5ad06 ("backlight: aw99706: Add support for Awinic AW99706 backlight") Signed-off-by: Junjie Cao <junjie.cao@linux.dev> Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org> Link: https://patch.msgid.link/20260804030255.1934470-3-junjie.cao@intel.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'scripts/git.orderFile')
0 files changed, 0 insertions, 0 deletions