wlan: Return NULL if zero is passed as argument to allocate memory

While allocating memory if zero is passed as argument then kernel will
return address ZERO_SIZE_PTR(0x10) leading to pass NULL check, which is
usually done after every memory allocation. Hence when zero is passed to
allocate memory then return NULL without calling kmalloc.
While initializing neighbor roam data structure, don't allocate memory
if neighbor roam channel list is empty.

Change-Id: I50bdb99a0cd8ccbc2d764b8ac21f66bba8a8fdc4
CRs-Fixed: 815664
2 files changed
tree: 6d34d4577fd77635cd18db948c7a263d2f936918
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile