From a41d42a9fda3a0aac36edeeb730da85e8cab0b1d Mon Sep 17 00:00:00 2001 From: Bhanusree Pola Date: Fri, 22 Mar 2019 18:10:10 +0530 Subject: [PATCH] Staging: gdm724x: Remove unnecessary print statements Remove print statements that provide information about error messages when memory allocation is failed. Issue found using coccinelle The following semantic patch is used to solve this: @@ expression x; constant char[] C; identifier f; @@ x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...)); if(x==NULL) { ... ( -f(C,...); | -f(...,C); ) ... } Signed-off-by: Bhanusree Pola Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gdm724x/gdm_lte.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c index 3c2aab7a921e..db11498f6fc7 100644 --- a/drivers/staging/gdm724x/gdm_lte.c +++ b/drivers/staging/gdm724x/gdm_lte.c @@ -871,7 +871,6 @@ int register_lte_device(struct phy_dev *phy_dev, net = alloc_netdev(sizeof(struct nic), pdn_dev_name, NET_NAME_UNKNOWN, ether_setup); if (!net) { - pr_err("alloc_netdev failed\n"); ret = -ENOMEM; goto err; } -- 2.30.2