“806d9dd71ff52ef09764585baaeec23afbb98560”上不存在“drivers/extcon/extcon-class.c”
提交 f08654a2 编写于 作者: Q Qipan Li 提交者: Mark Brown

spi: sirf: replace BUG condition by error code for unsupported transfer

return error for unsupported bits-per-word format, BUG() is not right
for this scenerios as we are not an ASSERT but an error handler.
Signed-off-by: NQipan Li <Qipan.Li@csr.com>
Signed-off-by: NBarry Song <baohua.song@csr.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 b787f68c
......@@ -559,7 +559,8 @@ spi_sirfsoc_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
sspi->tx_word = spi_sirfsoc_tx_word_u32;
break;
default:
BUG();
dev_err(&spi->dev, "bpw %d not supported\n", bits_per_word);
return -EINVAL;
}
sspi->word_width = DIV_ROUND_UP(bits_per_word, 8);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册