Commit 97e17d0e authored by Mike Rapoport's avatar Mike Rapoport Committed by Greg Kroah-Hartman
Browse files

staging: brcm80211: remove osl_malloced()/MALLOCED()



because there are other means to track memory leaks in kernel

Signed-off-by: default avatarMike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6a92fdf1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -60,8 +60,7 @@ bcmsdh_info_t *bcmsdh_attach(osl_t *osh, void *cfghdl, void **regsva, uint irq)

	bcmsdh = (bcmsdh_info_t *) MALLOC(osh, sizeof(bcmsdh_info_t));
	if (bcmsdh == NULL) {
		BCMSDH_ERROR(("bcmsdh_attach: out of memory, "
			"malloced %d bytes\n", MALLOCED(osh)));
		BCMSDH_ERROR(("bcmsdh_attach: out of memory"));
		return NULL;
	}
	bzero((char *)bcmsdh, sizeof(bcmsdh_info_t));
+2 −4
Original line number Diff line number Diff line
@@ -197,8 +197,7 @@ int bcmsdh_probe(struct device *dev)
	}
	sdhc = MALLOC(osh, sizeof(bcmsdh_hc_t));
	if (!sdhc) {
		SDLX_MSG(("%s: out of memory, allocated %d bytes\n",
			  __func__, MALLOCED(osh)));
		SDLX_MSG(("%s: out of memory\n", __func__));
		goto err;
	}
	bzero(sdhc, sizeof(bcmsdh_hc_t));
@@ -430,8 +429,7 @@ bcmsdh_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
	}
	sdhc = MALLOC(osh, sizeof(bcmsdh_hc_t));
	if (!sdhc) {
		SDLX_MSG(("%s: out of memory, allocated %d bytes\n",
			  __func__, MALLOCED(osh)));
		SDLX_MSG(("%s: out of memory\n", __func__));
		goto err;
	}
	bzero(sdhc, sizeof(bcmsdh_hc_t));
+1 −2
Original line number Diff line number Diff line
@@ -125,8 +125,7 @@ extern sdioh_info_t *sdioh_attach(osl_t *osh, void *bar0, uint irq)

	sd = (sdioh_info_t *) MALLOC(osh, sizeof(sdioh_info_t));
	if (sd == NULL) {
		sd_err(("sdioh_attach: out of memory, malloced %d bytes\n",
			MALLOCED(osh)));
		sd_err(("sdioh_attach: out of memory\n"));
		return NULL;
	}
	bzero((char *)sd, sizeof(sdioh_info_t));
+0 −4
Original line number Diff line number Diff line
@@ -1827,10 +1827,6 @@ osl_t *dhd_osl_attach(void *pdev, uint bustype)

void dhd_osl_detach(osl_t *osh)
{
	if (MALLOCED(osh)) {
		DHD_ERROR(("%s: MEMORY LEAK %d bytes\n", __func__,
			   MALLOCED(osh)));
	}
	osl_detach(osh);
}

+0 −2
Original line number Diff line number Diff line
@@ -96,10 +96,8 @@ typedef struct {

#define MALLOC(osh, size)	osl_malloc((osh), (size))
#define MFREE(osh, addr, size)	osl_mfree((osh), (addr), (size))
#define MALLOCED(osh)		osl_malloced((osh))
extern void *osl_malloc(osl_t *osh, uint size);
extern void osl_mfree(osl_t *osh, void *addr, uint size);
extern uint osl_malloced(osl_t *osh);

#define NATIVE_MALLOC(osh, size)	kmalloc(size, GFP_ATOMIC)
#define NATIVE_MFREE(osh, addr, size)	kfree(addr)
Loading