diff options
author | Andrzej Pietrasiewicz <andrzej.p@collabora.com> | 2019-06-03 19:05:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-04 09:34:57 +0200 |
commit | 959c7313967990e5a9eff4604abaa8bff4e6f8f9 (patch) | |
tree | 8183e07ffc93de450ed98300ecefe3bbca019e8f /arch/powerpc | |
parent | 718514c02cc9d43b9e2d9b62c22aae9e05e47c39 (diff) |
usb: gadget: Zero ffs_io_data
[ Upstream commit 508595515f4bcfe36246e4a565cf280937aeaade ]
In some cases the "Allocate & copy" block in ffs_epfile_io() is not
executed. Consequently, in such a case ffs_alloc_buffer() is never called
and struct ffs_io_data is not initialized properly. This in turn leads to
problems when ffs_free_buffer() is called at the end of ffs_epfile_io().
This patch uses kzalloc() instead of kmalloc() in the aio case and memset()
in non-aio case to properly initialize struct ffs_io_data.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/powerpc')
0 files changed, 0 insertions, 0 deletions