summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sh-hspi.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-03-13 03:32:37 +0100
committerMark Brown <broonie@linaro.org>2014-03-13 14:40:51 +0100
commited8eb250d7b097dbd888e46ad0d35a2cb1858221 (patch)
treef955d8f10d2daa01f0bd5fed49cdd6f74dbb40eb /drivers/spi/spi-sh-hspi.c
parentLinus 3.14-rc1 (diff)
downloadlinux-ed8eb250d7b097dbd888e46ad0d35a2cb1858221.tar.xz
linux-ed8eb250d7b097dbd888e46ad0d35a2cb1858221.zip
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: Axel Lin <axel.lin@ingics.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-sh-hspi.c')
0 files changed, 0 insertions, 0 deletions