spi: modified to the rx and tx buffers are not allocated when buffer size is zero.