Skip to content
Commit ed8eb250 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

spi: sh-sci: Prevent NULL pointer dereference



If sp->info is NULL, we will hit NULL pointer dereference in probe() while
setting bus_num and num_chipselect for master:

        sp->bitbang.master->bus_num = sp->info->bus_num;
        sp->bitbang.master->num_chipselect = sp->info->num_chipselect;

Thus add NULL test for sp->info in probe() to prevent NULL pointer dereference.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 38dbfb59
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment