diff options
Diffstat (limited to 'drivers/s390/crypto/ap_queue.c')
-rw-r--r-- | drivers/s390/crypto/ap_queue.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/crypto/ap_queue.c b/drivers/s390/crypto/ap_queue.c index 205045cd998d..c48b0db824e3 100644 --- a/drivers/s390/crypto/ap_queue.c +++ b/drivers/s390/crypto/ap_queue.c @@ -99,7 +99,7 @@ int ap_recv(ap_qid_t qid, unsigned long long *psmid, void *msg, size_t length) { struct ap_queue_status status; - if (msg == NULL) + if (!msg) return -EINVAL; status = ap_dqap(qid, psmid, msg, length, NULL, NULL); switch (status.response_code) { @@ -603,7 +603,7 @@ static ssize_t interrupt_show(struct device *dev, static DEVICE_ATTR_RO(interrupt); static ssize_t config_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { struct ap_queue *aq = to_ap_queue(dev); int rc; @@ -827,8 +827,9 @@ int ap_queue_message(struct ap_queue *aq, struct ap_message *ap_msg) aq->requestq_count++; aq->total_request_count++; atomic64_inc(&aq->card->total_request_count); - } else + } else { rc = -ENODEV; + } /* Send/receive as many request from the queue as possible. */ ap_wait(ap_sm_event_loop(aq, AP_SM_EVENT_POLL)); |