tile-srom: avoid krealloc(... __GFP_ZERO) pattern
authorChris Metcalf <cmetcalf@mellanox.com>
Thu, 28 Jul 2016 19:07:04 +0000 (15:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2016 12:45:50 +0000 (14:45 +0200)
commit069b188f43d9a44422eb35a8f95533d2c44ad315
treefed6b8e65379cf74c34ba6901506c5f71d8a23c5
parentacde785e492d6ce838f50937f7547124e0837a55
tile-srom: avoid krealloc(... __GFP_ZERO) pattern

Joe Perches points out [1] that this pattern isn't currently safe.
This driver doesn't really need the zeroing semantic anyway;
by restructuring the code slightly we can initialize all the
fields of the structure up front instead.

[1] https://lkml.kernel.org/r/1469729491.3998.58.camel@perches.com

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tile-srom.c