spi: fix bug by passing value instead of pointer as parameter