Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
phy: qcom-qmp: Zero-initialize typec switch descriptor
When registering a typec switch, typec_switch_register() expects the name field of the provided struct typec_switch_desc to be either set to a valid string or initialized with NULL. If it instead has been initialized by some random bytes from the stack, we may end up with a switch name of '(efault)-switch'. Furthermore, if we add multiple switches, registration may fail due to duplicate sysfs names. Zero-initialize the switch descriptor to fix this. Fixes: a6970d2 ("phy: qcom-qmp: Register as a typec switch for orientation detection") Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
- Loading branch information