summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>2026-03-17 18:20:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-17 18:38:25 +0300
commit88cf8a9ad32f85012eaf4bd1fe70ab39635ce89c (patch)
tree48c58a9e3dbda7c1de3653a6233070a99b10221a /include
parent678f946b40586a276421b2b4b6201665d6709119 (diff)
downloadlinux-88cf8a9ad32f85012eaf4bd1fe70ab39635ce89c.tar.xz
mux: mmio: Zero the allocated memory
Zero the allocated memory in probe() for fields and hardware states because: 1. The "hardware_states" array is not initialized in the probe, thus starting the device with uninitialized memory. This not a bug, because pointed memory will be assigned in suspend callback, however it is a discouraged coding practice. The "fields" array is initialized shortly further in the probe(). 2. Linux kernel convention for safer code encourages using zeroed allocations, as expressed in memory-allocation.rst document. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20260317152029.274829-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions