mirror of https://gitee.com/openkylin/linux.git
spi: spi-topcliff-pch: Fix sparse warnings
Fixes the following type of warnings: drivers/spi/spi-topcliff-pch.c:370:52: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
d683b96b07
commit
f5d8ee3f15
|
@ -367,7 +367,7 @@ static irqreturn_t pch_spi_handler(int irq, void *dev_id)
|
||||||
|
|
||||||
if (reg_spsr_val & SPSR_ORF_BIT) {
|
if (reg_spsr_val & SPSR_ORF_BIT) {
|
||||||
dev_err(&board_dat->pdev->dev, "%s Over run error\n", __func__);
|
dev_err(&board_dat->pdev->dev, "%s Over run error\n", __func__);
|
||||||
if (data->current_msg->complete != 0) {
|
if (data->current_msg->complete) {
|
||||||
data->transfer_complete = true;
|
data->transfer_complete = true;
|
||||||
data->current_msg->status = -EIO;
|
data->current_msg->status = -EIO;
|
||||||
data->current_msg->complete(data->current_msg->context);
|
data->current_msg->complete(data->current_msg->context);
|
||||||
|
@ -659,7 +659,7 @@ static void pch_spi_set_tx(struct pch_spi_data *data, int *bpw)
|
||||||
list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) {
|
list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) {
|
||||||
pmsg->status = -ENOMEM;
|
pmsg->status = -ENOMEM;
|
||||||
|
|
||||||
if (pmsg->complete != 0)
|
if (pmsg->complete)
|
||||||
pmsg->complete(pmsg->context);
|
pmsg->complete(pmsg->context);
|
||||||
|
|
||||||
/* delete from queue */
|
/* delete from queue */
|
||||||
|
@ -709,7 +709,7 @@ static void pch_spi_nomore_transfer(struct pch_spi_data *data)
|
||||||
* [To the spi core..indicating end of transfer] */
|
* [To the spi core..indicating end of transfer] */
|
||||||
data->current_msg->status = 0;
|
data->current_msg->status = 0;
|
||||||
|
|
||||||
if (data->current_msg->complete != 0) {
|
if (data->current_msg->complete) {
|
||||||
dev_dbg(&data->master->dev,
|
dev_dbg(&data->master->dev,
|
||||||
"%s:Invoking callback of SPI core\n", __func__);
|
"%s:Invoking callback of SPI core\n", __func__);
|
||||||
data->current_msg->complete(data->current_msg->context);
|
data->current_msg->complete(data->current_msg->context);
|
||||||
|
@ -1202,7 +1202,7 @@ static void pch_spi_process_messages(struct work_struct *pwork)
|
||||||
list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) {
|
list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) {
|
||||||
pmsg->status = -EIO;
|
pmsg->status = -EIO;
|
||||||
|
|
||||||
if (pmsg->complete != 0) {
|
if (pmsg->complete) {
|
||||||
spin_unlock(&data->lock);
|
spin_unlock(&data->lock);
|
||||||
pmsg->complete(pmsg->context);
|
pmsg->complete(pmsg->context);
|
||||||
spin_lock(&data->lock);
|
spin_lock(&data->lock);
|
||||||
|
|
Loading…
Reference in New Issue