Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff35eb23 authored by Markus Elfring's avatar Markus Elfring Committed by Greg Kroah-Hartman
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent df2aa81a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
	int bus_nr;
	struct ipack_bus_device *bus;

	bus = kzalloc(sizeof(struct ipack_bus_device), GFP_KERNEL);
	bus = kzalloc(sizeof(*bus), GFP_KERNEL);
	if (!bus)
		return NULL;