mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
input: qcom-hv-haptics: Fix haptics_init_fifo_memory()
"fifo" is allocated per effect only when "qcom,wf-fifo-data" DT property is specified. Fix haptics_init_fifo_memory() so that it doesn't access that when parsing per effect data structure for configuration. Change-Id: I4f48e5c43c3b289e47d9a9a0934a642172e65555 Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
This commit is contained in:
parent
44ec5b55d0
commit
614c8a90b1
|
|
@ -2683,7 +2683,7 @@ static int haptics_init_fifo_memory(struct haptics_chip *chip)
|
|||
|
||||
for (i = 0; i < chip->effects_count; i++) {
|
||||
effect = &chip->effects[i];
|
||||
if (!effect->fifo->preload)
|
||||
if (!effect->fifo || !effect->fifo->preload)
|
||||
continue;
|
||||
|
||||
rc = haptics_mmap_preload_fifo_effect(chip, effect);
|
||||
|
|
@ -2697,7 +2697,7 @@ static int haptics_init_fifo_memory(struct haptics_chip *chip)
|
|||
|
||||
for (i = 0; i < chip->effects_count; i++) {
|
||||
effect = &chip->effects[i];
|
||||
if (!effect->fifo->preload)
|
||||
if (!effect->fifo || !effect->fifo->preload)
|
||||
continue;
|
||||
|
||||
rc = haptics_config_preload_fifo_effect(chip, effect);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user