leds: leds-qpnp: bug fix for NULL pointer dereference in qpnp_xxx_set()
In previous merged commit: e7bca9b9, there is a bug about NULL pointer dereference in qpnp_xxx_set functions. When led_mode is MANUAL_MODE, there will be no PWM config data, so "pwm_cfg" is a NULL pointer in this situation. Fix this by using it only when the PWM config data exists. CRs-Fixed: 622683 Change-Id: Ife218cc352e9620e86e0dda96335b6a43bdb65fb Signed-off-by:Xu Kai <kaixu@codeaurora.org>
Loading
Please register or sign in to comment