regulators: kzalloc doubt

From: Thiago Farina
Date: Tue May 03 2011 - 17:54:18 EST


Hi guys,

What is the preferred way to use kzalloc? I have seen two ways under
drivers/regulator/.

1-

struct my_regulator_info *info = NULL;

info = kzalloc(sizeof(struct my_regulator_info), GFP_KERNEL);

2-

struct my_regulator_info *info;

info = kzalloc(sizeof(*info), GFP_KERNEL);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/