Message ID | 20210610075124.15818-1-thunder.leizhen@huawei.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/1] scsi: fcoe: remove unnecessary oom message | expand |
diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index 4d0e19e7c84b91a..815915734d88d43 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c @@ -639,10 +639,8 @@ static int fcoe_add_netdev_mapping(struct net_device *netdev, struct fcoe_netdev_mapping *nm; nm = kmalloc(sizeof(*nm), GFP_KERNEL); - if (!nm) { - printk(KERN_ERR "Unable to allocate netdev_mapping"); + if (!nm) return -ENOMEM; - } nm->netdev = netdev; nm->ft = ft;
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/fcoe/fcoe_transport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.26.0.106.g9fadedd