diff options
author | Edmond Chung <edmondchung@google.com> | 2023-06-07 14:13:31 -0700 |
---|---|---|
committer | Edmond Chung <edmondchung@google.com> | 2023-06-08 20:28:47 +0000 |
commit | c146f12ef2db9109941588fcfa87e54bf644673f (patch) | |
tree | 97444a26e04b7738d46c7621df3833ef6c386b8b | |
parent | 1a84358ccca0a8635dde92e361559d69b79bdb2a (diff) | |
download | lwis-c146f12ef2db9109941588fcfa87e54bf644673f.tar.gz |
DT: Fix potential nullptr dereference in interrupt parsing
Return error code explicitly so that we can ensure that the caller will
go through the error handling code.
Bug: 286285335
Test: Build
Change-Id: I68556711d992e4f7e80e5304ffb54c284f3289dd
Signed-off-by: Edmond Chung <edmondchung@google.com>
-rw-r--r-- | lwis_dt.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -441,7 +441,7 @@ static int parse_irq_reg_bits(struct device_node *info, int *bits_num_result, u3 if (*bits_num_result != int_reg_bits_num) { pr_err("Error getting int-reg-bits: %d\n", int_reg_bits_num); kfree(int_reg_bits); - return int_reg_bits_num; + return -EINVAL; } *reg_bits_result = int_reg_bits; |