From: Pierre-Yves Kerbrat Date: Wed, 19 Oct 2016 18:49:53 +0000 (+0200) Subject: staging: rtl8188eu: os_dep: remove unnecessary alloc fail message X-Git-Tag: v4.10-rc1~148^2~436 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fb26718744c46f34fb9b8cdf5f73030548978b49;p=karo-tx-linux.git staging: rtl8188eu: os_dep: remove unnecessary alloc fail message Remove redundant alloc fail message This patch fixes the warning found by checkpatch Signed-off-by: Pierre-Yves Kerbrat Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index c036fe7d1df8..6ff836f481da 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -43,14 +43,12 @@ 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__); - return NULL; - } + if (!a) + goto out; for (j = 0; j < h; j++) a[j] = ((char *)(a + h)) + j * w * size; - +out: return a; }