diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-05-15 05:08:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-18 10:59:06 -0400 |
commit | ff35eb23de9be50fbe3405f35244b5e82eadc5fa (patch) | |
tree | 4224f2af13bfeaa2a420f16394f18fad70b810aa | |
parent | df2aa81a44a904c34473f0974d67c5b257163e86 (diff) |
ipack: Improve a size determination in ipack_bus_register()
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/ipack/ipack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c index 575c4f29e0f7..a1e07a77d4e6 100644 --- a/drivers/ipack/ipack.c +++ b/drivers/ipack/ipack.c | |||
@@ -212,7 +212,7 @@ struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots, | |||
212 | int bus_nr; | 212 | int bus_nr; |
213 | struct ipack_bus_device *bus; | 213 | struct ipack_bus_device *bus; |
214 | 214 | ||
215 | bus = kzalloc(sizeof(struct ipack_bus_device), GFP_KERNEL); | 215 | bus = kzalloc(sizeof(*bus), GFP_KERNEL); |
216 | if (!bus) | 216 | if (!bus) |
217 | return NULL; | 217 | return NULL; |
218 | 218 | ||