remarkable-linux/drivers/base
Anton Vorontsov 5cfc64ceb6 base/platform: Safe handling for NULL platform data and resources
Some users of platform_device_add_{data,resources}() assume that
NULL data and resources will be handled specially, i.e. just ignored.

But the platform core ends up calling kmemdup(NULL, 0, ...), which
returns a non-NULL result (i.e. ZERO_SIZE_PTR), which causes drivers
to oops on a valid code, something like:

  if (platform_data)
  	stuff = platform_data->stuff;

This patch makes the platform core a bit more safe for such cases.

Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22 10:16:43 -07:00
..
power PM: Prevent waiting forever on asynchronous resume after failing suspend 2010-09-09 00:49:43 +02:00
attribute_container.c
base.h
bus.c driver core: fix memory leak on one error path in bus_register() 2010-08-05 13:53:35 -07:00
class.c kobj: Add basic infrastructure for dealing with namespaces. 2010-05-21 09:37:31 -07:00
core.c driver core: device_rename's new_name can be const 2010-08-05 13:53:35 -07:00
cpu.c drivers/base/cpu.c: fix the output from /sys/devices/system/cpu/offline 2010-05-21 09:37:28 -07:00
dd.c Driver core: Add BUS_NOTIFY_BIND_DRIVER 2010-08-05 13:53:35 -07:00
devres.c
devtmpfs.c devtmpfs: support !CONFIG_TMPFS 2010-05-21 09:37:30 -07:00
dma-coherent.c Driver core: internal struct dma_coherent_mem, change type of a member. 2010-08-05 13:53:33 -07:00
dma-mapping.c
driver.c
firmware.c
firmware_class.c firmware_class: fix typo in error path 2010-08-23 18:12:46 -07:00
hypervisor.c
init.c
iommu.c
isa.c
Kconfig devtmpfs: support !CONFIG_TMPFS 2010-05-21 09:37:30 -07:00
Makefile
map.c
memory.c
module.c driver core: module.c: Use kasprintf 2010-05-21 09:37:29 -07:00
node.c drivers/base/node.c: reduce stack usage of node_read_meminfo() 2010-08-09 20:45:02 -07:00
platform.c base/platform: Safe handling for NULL platform data and resources 2010-10-22 10:16:43 -07:00
sys.c
topology.c topology: convert cpu notifier to return encapsulate errno value 2010-05-27 09:12:48 -07:00
transport_class.c