powerpc: Use sizeof(*foo) rather than sizeof(struct foo)
It's slightly less error prone to use sizeof(*foo) rather than specifying the type. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> [mpe: Consolidate into one patch, rewrite change log] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
31513207ce
commit
a0828cf57a
@@ -397,7 +397,7 @@ static int rackmeter_probe(struct macio_dev* mdev,
|
||||
}
|
||||
|
||||
/* Create and initialize our instance data */
|
||||
rm = kzalloc(sizeof(struct rackmeter), GFP_KERNEL);
|
||||
rm = kzalloc(sizeof(*rm), GFP_KERNEL);
|
||||
if (rm == NULL) {
|
||||
printk(KERN_ERR "rackmeter: failed to allocate memory !\n");
|
||||
rc = -ENOMEM;
|
||||
|
Reference in New Issue
Block a user