Merge branch 'spi-4.18' into spi-linus
authorMark Brown <broonie@kernel.org>
Fri, 10 Aug 2018 16:51:50 +0000 (17:51 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 10 Aug 2018 16:51:50 +0000 (17:51 +0100)
1  2 
drivers/spi/spi-davinci.c

index 577084bb911bad7292f0ea4bcbbf7d0b1b9e35ba,4ffc0f495be83e20cfe1ed042b27b3e7ca2c1b41..a02099c90c5c2ec64d0315bf93799dcae79fe539
@@@ -217,7 -217,7 +217,7 @@@ static void davinci_spi_chipselect(stru
        pdata = &dspi->pdata;
  
        /* program delay transfers if tx_delay is non zero */
-       if (spicfg->wdelay)
+       if (spicfg && spicfg->wdelay)
                spidat1 |= SPIDAT1_WDEL;
  
        /*
@@@ -923,10 -923,9 +923,10 @@@ static int davinci_spi_probe(struct pla
        /* pdata in dspi is now updated and point pdata to that */
        pdata = &dspi->pdata;
  
 -      dspi->bytes_per_word = devm_kzalloc(&pdev->dev,
 -                                          sizeof(*dspi->bytes_per_word) *
 -                                          pdata->num_chipselect, GFP_KERNEL);
 +      dspi->bytes_per_word = devm_kcalloc(&pdev->dev,
 +                                          pdata->num_chipselect,
 +                                          sizeof(*dspi->bytes_per_word),
 +                                          GFP_KERNEL);
        if (dspi->bytes_per_word == NULL) {
                ret = -ENOMEM;
                goto free_master;