The patch titled pxa2xx_spi: prevent panic case setup() fails has been added to the -mm tree. Its filename is pxa2xx_spi-prevent-panic-case-setup-fails.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: pxa2xx_spi: prevent panic case setup() fails From: Daniel Ribeiro <drwyrm@xxxxxxxxx> setup() may fail before ctldata is set, causing a kernel panic on cleanup(). Signed-off-by: Daniel Ribeiro <drwyrm@xxxxxxxxx> Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx> Cc: Eric Miao <eric.y.miao@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/spi/pxa2xx_spi.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN drivers/spi/pxa2xx_spi.c~pxa2xx_spi-prevent-panic-case-setup-fails drivers/spi/pxa2xx_spi.c --- a/drivers/spi/pxa2xx_spi.c~pxa2xx_spi-prevent-panic-case-setup-fails +++ a/drivers/spi/pxa2xx_spi.c @@ -1373,6 +1373,9 @@ static void cleanup(struct spi_device *s { struct chip_data *chip = spi_get_ctldata(spi); + if (!chip) + return; + if (gpio_is_valid(chip->gpio_cs)) gpio_free(chip->gpio_cs); _ Patches currently in -mm which might be from drwyrm@xxxxxxxxx are origin.patch pxa2xx_spi-prevent-panic-case-setup-fails.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html