On Thu, Mar 13, 2014 at 3:32 AM, Axel Lin <axel.lin@xxxxxxxxxx> wrote: > 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@xxxxxxxxxx> Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html