slimbus: core: check get_addr before removing laddr ida
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fri, 25 Sep 2020 09:55:18 +0000 (10:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Sep 2020 12:41:50 +0000 (14:41 +0200)
commitf97769fde678e111a1b7b165b380d8a3dfe54f4e
treef9866b19caa352f61ed1889a898e5d6345594bb0
parent5a487cf7efe4b63e902d6883b17b8f505db21ab0
slimbus: core: check get_addr before removing laddr ida

logical address can be either assigned by the SLIMBus controller or the core.
Core uses IDA in cases where get_addr callback is not provided by the
controller.
Core already has this check while allocating IDR, however during absence
reporting this is not checked. This patch fixes this issue.

Fixes: 46a2bb5a7f7e ("slimbus: core: Add slim controllers support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200925095520.27316-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/slimbus/core.c