driver core/platform_device_add_resources: set resource to NULL if !res
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 20 Apr 2011 07:44:44 +0000 (09:44 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 23 Apr 2011 00:09:13 +0000 (17:09 -0700)
commitcea896238fbfdbce254f51fc8fd78c59df50081f
tree4536217e6a2f43432384e526e962d2240b141c23
parent251e031d132ea3d03e0a32f2240c67f449979c5d
driver core/platform_device_add_resources: set resource to NULL if !res

This makes the res = NULL case more consistant to the res != NULL case
as now both overwrite pdev->resource.

Reviewed-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/platform.c