Message ID | 20210610080918.16292-1-thunder.leizhen@huawei.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/1] snic: remove unnecessary oom message | expand |
diff --git a/drivers/scsi/snic/vnic_wq.c b/drivers/scsi/snic/vnic_wq.c index 1e91d432089e805..bcf05057861e1fc 100644 --- a/drivers/scsi/snic/vnic_wq.c +++ b/drivers/scsi/snic/vnic_wq.c @@ -48,11 +48,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]) { - pr_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/snic/vnic_wq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)