Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Markus Elfring and committed by
Greg Kroah-Hartman
ff35eb23 df2aa81a

+1 -1
+1 -1
drivers/ipack/ipack.c
··· 212 212 int bus_nr; 213 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 216 if (!bus) 217 217 return NULL; 218 218