mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-15 22:41:38 +00:00
Input: misc - use sizeof(*pointer) instead of sizeof(type)
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB7237884EB989EFF55D1BEF8B8BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
committed by
Dmitry Torokhov
parent
bb8706a419
commit
a0bd7adadb
@@ -379,7 +379,7 @@ static int uinput_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct uinput_device *newdev;
|
||||
|
||||
newdev = kzalloc(sizeof(struct uinput_device), GFP_KERNEL);
|
||||
newdev = kzalloc(sizeof(*newdev), GFP_KERNEL);
|
||||
if (!newdev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user