spi: code fixes in samples