firmware: smci: possible NULL dereference

sandbox_scmi_devices_ctx() may return NULL. We should not dereference this
value in sandbox_scmi_devices_remove().

The problem was indicated by 'gcc-11 -fanalyzer'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
45 jobs for dm-pull-3feb21 in 44 minutes and 51 seconds (queued for 2 seconds)
latest
Status Name Job ID Coverage
  Testsuites
passed Build envtools #216720
all

00:00:26

passed Build tools-only #216719
all

00:00:13

passed Check for configs without MAINTAINERS entry #216718
all

00:00:15

passed cppcheck #216714
all

00:00:51

passed grep TODO/FIXME/HACK #216715
all

00:00:10

passed htmldocs #216716
all

00:00:59

passed Run binman, buildman, dtoc, Kconfig and patman testsuites #216721
all

00:00:48

passed Run tests for Nokia RX-51 (aka N900) #216722
all

00:03:07

passed sloccount #216717
all

00:00:35

 
  Test.Py
passed evb-ast2500 test.py #216726
all

00:00:32

passed integratorcp_cm926ejs test.py #216730
all

00:00:30

passed qemu_arm64 test.py #216732
all

00:01:06

passed qemu_arm test.py #216731
all

00:01:33

passed qemu_malta64el test.py #216740
all

00:00:52

passed qemu_malta64 test.py #216739
all

00:00:27

passed qemu_maltael test.py #216738
all

00:00:51

passed qemu_malta test.py #216737
all

00:00:30

passed qemu_mips64el test.py #216736
all

00:00:27

passed qemu_mips64 test.py #216735
all

00:00:33

passed qemu_mipsel test.py #216734
all

00:00:30

passed qemu_mips test.py #216733
all

00:00:35

passed qemu-ppce500 test.py #216741
all

00:00:35

passed qemu-riscv32_spl test.py #216744
all

00:00:57

passed qemu-riscv32 test.py #216742
all

00:00:47

passed qemu-riscv64_spl test.py #216745
all

00:00:38

passed qemu-riscv64 test.py #216743
all

00:01:16

passed qemu-x86_64 test.py #216747
all

00:01:11

passed qemu-x86 test.py #216746
all

00:01:02

passed r2dplus_i82557c test.py #216748
all

00:00:52

passed r2dplus_pcnet test.py #216749
all

00:00:52

passed r2dplus_rtl8139 test.py #216750
all

00:00:27

passed r2dplus_tulip test.py #216751
all

00:00:29

passed sandbox_flattree test.py #216727
all

00:00:46

passed sandbox_spl test.py #216725
all

00:01:04

passed sandbox test.py #216723
all

00:01:36

passed sandbox with clang test.py #216724
all

00:03:41

passed vexpress_ca15_tc2 test.py #216728
all

00:00:53

passed vexpress_ca9x4 test.py #216729
all

00:00:27

passed xilinx_versal_virt test.py #216753
all

00:00:37

passed xilinx_zynq_virt test.py #216752
all

00:00:58

passed xtfpga test.py #216754
all

00:00:52

 
  World Build
passed build all 32bit ARM platforms #216755
all

00:32:48

passed build all 64bit ARM platforms #216756
all

00:06:24

passed build all other platforms #216758
all

00:05:23

passed build all PowerPC platforms #216757
all

00:12:30