]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/nvec/nvec.c
staging/vc04_services: add CONFIG_OF dependency
[karo-tx-linux.git] / drivers / staging / nvec / nvec.c
index 9fda136b8e05ea333e6868e4dfa8808f55cd4398..c1feccf8d94af93e10a6f3ff1828ed255d289816 100644 (file)
@@ -264,7 +264,7 @@ int nvec_write_async(struct nvec_chip *nvec, const unsigned char *data,
 
        msg = nvec_msg_alloc(nvec, NVEC_MSG_TX);
 
-       if (msg == NULL)
+       if (!msg)
                return -ENOMEM;
 
        msg->data[0] = size;
@@ -620,7 +620,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
                } else {
                        nvec->rx = nvec_msg_alloc(nvec, NVEC_MSG_RX);
                        /* Should not happen in a normal world */
-                       if (unlikely(nvec->rx == NULL)) {
+                       if (unlikely(!nvec->rx)) {
                                nvec->state = 0;
                                break;
                        }
@@ -659,10 +659,11 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
                } else if (nvec->tx && nvec->tx->pos < nvec->tx->size) {
                        to_send = nvec->tx->data[nvec->tx->pos++];
                } else {
-                       dev_err(nvec->dev, "tx buffer underflow on %p (%u > %u)\n",
+                       dev_err(nvec->dev,
+                               "tx buffer underflow on %p (%u > %u)\n",
                                nvec->tx,
-                               (uint) (nvec->tx ? nvec->tx->pos : 0),
-                               (uint) (nvec->tx ? nvec->tx->size : 0));
+                               (uint)(nvec->tx ? nvec->tx->pos : 0),
+                               (uint)(nvec->tx ? nvec->tx->size : 0));
                        nvec->state = 0;
                }
                break;