summaryrefslogtreecommitdiff
path: root/drivers/staging/ccree/ssi_request_mgr.c
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2017-11-09 12:16:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-27 11:20:38 +0300
commit474f75a14c0d4b3782cc1640d6ab4e78501ad5f8 (patch)
treea4807f8ce7de735baa36095c3c754e9d3f564282 /drivers/staging/ccree/ssi_request_mgr.c
parent6d7d9e787034a9dab21a27dc763aae2a84d90c75 (diff)
downloadlinux-474f75a14c0d4b3782cc1640d6ab4e78501ad5f8.tar.xz
staging: ccree: remove compare to none zero
The driver was full of code checking "if (x != 0)". Replace by "if (x)" for better readability. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ccree/ssi_request_mgr.c')
-rw-r--r--drivers/staging/ccree/ssi_request_mgr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c
index f5d51c185cbd..8fa3fc1aa1d5 100644
--- a/drivers/staging/ccree/ssi_request_mgr.c
+++ b/drivers/staging/ccree/ssi_request_mgr.c
@@ -73,7 +73,7 @@ void request_mgr_fini(struct ssi_drvdata *drvdata)
if (!req_mgr_h)
return; /* Not allocated */
- if (req_mgr_h->dummy_comp_buff_dma != 0) {
+ if (req_mgr_h->dummy_comp_buff_dma) {
dma_free_coherent(dev, sizeof(u32), req_mgr_h->dummy_comp_buff,
req_mgr_h->dummy_comp_buff_dma);
}
@@ -275,8 +275,8 @@ int send_request(
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
rc = cc_pm_get(dev);
- if (rc != 0) {
- dev_err(dev, "cc_pm_get returned %x\n", rc);
+ if (rc) {
+ dev_err(dev, "ssi_power_mgr_runtime_get returned %x\n", rc);
return rc;
}
#endif
@@ -333,7 +333,7 @@ int send_request(
ssi_req->ivgen_dma_addr_len,
ssi_req->ivgen_size, iv_seq, &iv_seq_len);
- if (unlikely(rc != 0)) {
+ if (unlikely(rc)) {
dev_err(dev, "Failed to generate IV (rc=%d)\n", rc);
spin_unlock_bh(&req_mgr_h->hw_lock);
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
@@ -412,7 +412,7 @@ int send_request_init(
/* Wait for space in HW and SW FIFO. Poll for as much as FIFO_TIMEOUT. */
rc = request_mgr_queues_status_check(drvdata, req_mgr_h,
total_seq_len);
- if (unlikely(rc != 0))
+ if (unlikely(rc))
return rc;
set_queue_last_ind(&desc[(len - 1)]);
@@ -500,7 +500,7 @@ static void proc_completions(struct ssi_drvdata *drvdata)
request_mgr_handle->axi_completed);
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
rc = cc_pm_put_suspend(dev);
- if (rc != 0)
+ if (rc)
dev_err(dev, "Failed to set runtime suspension %d\n",
rc);
#endif