From: Christian Engelmayer Date: Thu, 24 Apr 2014 20:35:56 +0000 (+0200) Subject: wlcore: fix usage of platform_device_add_data() X-Git-Tag: omap-for-v3.16/fixes-against-rc1~36^2~279^2^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c10416236732f205ed1670064da46306d66a2ce;p=pandora-kernel.git wlcore: fix usage of platform_device_add_data() Coverity CID 986698 reports leakage of struct wlcore_platdev_data in the probe functions of both the SPI/SDIO interfaces. The structure passed to platform_device_add_data() is dynamically allocated and only freed in the error paths, however, platform_device_add_data() adds a copy of the platform specific data to the device. Move the temporary struct that is kmemdup'ed to the stack. This issue exists since afb43e6d (wlcore: remove if_ops from platform_data). Signed-off-by: Christian Engelmayer Signed-off-by: John W. Linville --- Reading git-diff-tree failed