diff options
| author | Vladimir Zapolskiy <[email protected]> | 2018-11-02 15:39:43 +0200 |
|---|---|---|
| committer | Linus Walleij <[email protected]> | 2018-11-09 11:16:57 +0100 |
| commit | a05a14049999598a3bb6fab12db6b768a0215522 (patch) | |
| tree | 902dc93aede3e9b35673e404aba3c6bb43916e2a /lib/mpi/mpi-div.c | |
| parent | defeea5ee23d9cdd296801a0a9ea885c037ff9c9 (diff) | |
gpio: don't free unallocated ida on gpiochip_add_data_with_key() error path
The change corrects the error path in gpiochip_add_data_with_key()
by avoiding to call ida_simple_remove(), if ida_simple_get() returns
an error.
Note that ida_simple_remove()/ida_free() throws a BUG(), if id argument
is negative, it allows to easily check the correctness of the fix by
fuzzing the return value from ida_simple_get().
Fixes: ff2b13592299 ("gpio: make the gpiochip a real device")
Cc: [email protected] # v4.6+
Signed-off-by: Vladimir Zapolskiy <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-div.c')
0 files changed, 0 insertions, 0 deletions