Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx> --- drivers/scsi/fnic/fnic_trace.c | 2 -- drivers/scsi/fnic/vnic_rq.c | 4 +--- drivers/scsi/fnic/vnic_wq.c | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c index 4a7536bb0ab3874..34aac0253901a99 100644 --- a/drivers/scsi/fnic/fnic_trace.c +++ b/drivers/scsi/fnic/fnic_trace.c @@ -481,8 +481,6 @@ int fnic_trace_buf_init(void) fnic_trace_buf_p = (unsigned long)vzalloc(trace_max_pages * PAGE_SIZE); if (!fnic_trace_buf_p) { - printk(KERN_ERR PFX "Failed to allocate memory " - "for fnic_trace_buf_p\n"); err = -ENOMEM; goto err_fnic_trace_buf_init; } diff --git a/drivers/scsi/fnic/vnic_rq.c b/drivers/scsi/fnic/vnic_rq.c index 6a35b1be00322db..9c341cc50e119d3 100644 --- a/drivers/scsi/fnic/vnic_rq.c +++ b/drivers/scsi/fnic/vnic_rq.c @@ -32,10 +32,8 @@ static int vnic_rq_alloc_bufs(struct vnic_rq *rq) for (i = 0; i < blks; i++) { rq->bufs[i] = kzalloc(VNIC_RQ_BUF_BLK_SZ, GFP_ATOMIC); - if (!rq->bufs[i]) { - printk(KERN_ERR "Failed to alloc rq_bufs\n"); + if (!rq->bufs[i]) return -ENOMEM; - } } for (i = 0; i < blks; i++) { diff --git a/drivers/scsi/fnic/vnic_wq.c b/drivers/scsi/fnic/vnic_wq.c index 442972c04e65d39..da1c775410cb0f9 100644 --- a/drivers/scsi/fnic/vnic_wq.c +++ b/drivers/scsi/fnic/vnic_wq.c @@ -52,10 +52,8 @@ static int vnic_wq_alloc_bufs(struct vnic_wq *wq) for (i = 0; i < blks; i++) { wq->bufs[i] = kzalloc(VNIC_WQ_BUF_BLK_SZ, GFP_ATOMIC); - if (!wq->bufs[i]) { - printk(KERN_ERR "Failed to alloc wq_bufs\n"); + if (!wq->bufs[i]) return -ENOMEM; - } } for (i = 0; i < blks; i++) { -- 2.26.0.106.g9fadedd