Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1503853

[PATCH 13/37] staging:r8188eu: remove debug messages after memory allocation failed

From Ivan Safonov <insafonov@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 13/37] staging:r8188eu: remove debug messages after memory allocation failed
Date 2016-10-19 17:20 +0200
Message-ID <su0OR-308-5@gated-at.bofh.it> (permalink)
References <su0Fb-2Wq-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


These messages are redundant.
Also break rtw_usb_if1_init function if HalData allocation failed.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_efuse.c       | 4 +---
 drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c     | 4 +---
 drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c   | 2 --
 drivers/staging/rtl8188eu/os_dep/osdep_service.c | 4 +---
 drivers/staging/rtl8188eu/os_dep/usb_intf.c      | 2 +-
 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 -
 6 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
index 6953f7f..471f9c8 100644
--- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
+++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
@@ -103,10 +103,8 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8  *pbuf)
 		return;
 
 	eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
-	if (!eFuseWord) {
-		DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
+	if (!eFuseWord)
 		goto eFuseWord_failed;
-	}
 
 	/*  0. Refresh efuse init map as all oxFF. */
 	for (i = 0; i < EFUSE_MAX_SECTION_88E; i++)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c
index d0f59b7..210d89b 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c
@@ -461,10 +461,8 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished)
 
 	DBG_88E("%s\n", __func__);
 	ReservedPagePacket = kzalloc(1000, GFP_KERNEL);
-	if (!ReservedPagePacket) {
-		DBG_88E("%s: alloc ReservedPagePacket fail!\n", __func__);
+	if (!ReservedPagePacket)
 		return;
-	}
 
 	pxmitpriv = &adapt->xmitpriv;
 	pmlmeext = &adapt->mlmeextpriv;
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index 0fc093e..a79bb3a 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -41,8 +41,6 @@ int	rtw_hal_init_recv_priv(struct adapter *padapter)
 		kcalloc(NR_RECVBUFF, sizeof(struct recv_buf), GFP_KERNEL);
 	if (!precvpriv->precv_buf) {
 		res = _FAIL;
-		RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
-				("alloc recv_buf fail!\n"));
 		goto exit;
 	}
 	precvbuf = precvpriv->precv_buf;
diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c
index 7cd2655..8985c80 100644
--- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c
@@ -44,10 +44,8 @@ void *rtw_malloc2d(int h, int w, int size)
 	int j;
 
 	void **a = kzalloc(h*sizeof(void *) + h*w*size, GFP_KERNEL);
-	if (!a) {
-		pr_info("%s: alloc memory fail!\n", __func__);
+	if (!a)
 		return NULL;
-	}
 
 	for (j = 0; j < h; j++)
 		a[j] = ((char *)(a+h)) + j*w*size;
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index c6316ff..ba72f06 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -354,7 +354,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 
 	padapter->HalData = kzalloc(sizeof(struct hal_data_8188e), GFP_KERNEL);
 	if (!padapter->HalData)
-		DBG_88E("cant not alloc memory for HAL DATA\n");
+		goto free_adapter;
 
 	/* step read_chip_version */
 	rtw_hal_read_chip_version(padapter);
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
index 4b078b5..315b077 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
@@ -239,7 +239,6 @@ static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 i
 	pIo_buf = kmalloc(MAX_USB_IO_CTL_SIZE, GFP_ATOMIC);
 
 	if (pIo_buf == NULL) {
-		DBG_88E("[%s] pIo_buf == NULL\n", __func__);
 		status = -ENOMEM;
 		goto release_mutex;
 	}
-- 
2.7.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/37] staging:r8188eu: remove get_rxmem function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:10 +0200
  [PATCH 25/37] staging:r8188eu: remove len member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:10 +0200
  [PATCH 32/37] staging:r8188eu: remove SET_EARLYMODE_* definitions Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:10 +0200
  [PATCH 24/37] staging:r8188eu: remove rx_tail member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:10 +0200
  [PATCH 13/37] staging:r8188eu: remove debug messages after memory allocation failed Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
    Re: [PATCH 13/37] staging:r8188eu: remove debug messages after  memory allocation failed Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-25 11:20 +0200
  [PATCH 21/37] staging:r8188eu: change recvframe_pull_tail last argument type Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 02/37] staging:r8188eu: remove device assignment after netdev_alloc_skb call Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
    Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-10-19 19:00 +0200
      Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-10-19 19:10 +0200
        Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Ivan Safonov <insafonov@gmail.com> - 2016-10-20 14:20 +0200
          Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-25 11:00 +0200
    Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-20 10:50 +0200
  [PATCH 37/37] staging:r8188eu: remove P2P_* enumerations. Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 19/37] staging:r8188eu: remove rx_end member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 04/37] staging:r8188eu: remove WIFI_MP_* definitions and all corresponding code Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 30/37] staging:r8188eu: remove eth_type member of rx_pkt_attrib structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 16/37] staging:r8188eu: change recvframe_pull last argument type Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 36/37] staging:r8188eu: remove unused structures from include/rtw_mlme.h Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 03/37] staging:r8188eu: remove skb cloning after netdev_alloc_skb fail Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
    Re: [PATCH 03/37] staging:r8188eu: remove skb cloning after  netdev_alloc_skb fail Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-20 10:50 +0200
  [PATCH 27/37] staging:r8188eu: remove recvframe_put function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 07/37] staging:r8188eu: remove is2t argument if the phy_iq_calibrate function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 11/37] staging:r8188eu: remove is_(multicast|broadcast)_mac_addr Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 10/37] staging:r8188eu: remove type cast for first argument of memset Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 14/37] staging:r8188eu: remove ieee80211_is_empty_essid function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 15/37] staging:r8188eu: remove rx_head member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 34/37] staging:r8188eu: remove update_bcn member of mlme_priv structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 23/37] staging:r8188eu: update rx_tail and pkt->tail synchronously Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 20/37] staging:r8188eu: change recvframe_put last argument type Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 22/37] staging:r8188eu: change recvframe_pull_tail type to void Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 31/37] staging:r8188eu: remove pscanned member of mlme_priv structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 35/37] staging:r8188eu: remove clr_fwstate* functions Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 29/37] staging:r8188eu: take out stripping of iv and icv space from wlanhdr_to_ethhdr function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
    Re: [PATCH 29/37] staging:r8188eu: take out stripping of iv and icv  space from wlanhdr_to_ethhdr function Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-20 11:20 +0200
  [PATCH 12/37] staging:r8188eu: remove ieee80211_get_hdrlen function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 26/37] staging:r8188eu: remove recvframe_pull function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 09/37] staging:r8188eu: remove is2t argument of phy_lc_calibrate function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 28/37] staging:r8188eu: remove recvframe_pull_tail function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 18/37] staging:r8188eu: remove rx_data member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 08/37] staging:r8188eu: refactor path_adda_on function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  Re: [PATCH 01/37] staging:r8188eu: remove get_rxmem function Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-20 11:20 +0200
    Re: [PATCH 01/37] staging:r8188eu: remove get_rxmem function Ivan Safonov <insafonov@gmail.com> - 2016-10-20 16:00 +0200

csiph-web