@@ -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;
}
@@ -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++) {
@@ -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++) {
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@huawei.com> --- 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(-) -- 2.26.0.106.g9fadedd