Skip to content

Commit 6cebd8e

Browse files
Wentong Tiandtor
authored andcommitted
Input: serio - complete sizeof(*pointer) conversions
Complete the sizeof(*pointer) conversion for arc_ps2, altera_ps2, and olpc_apsp drivers. This follows the cleanup initiated in commit 06b449d ("Input: serio - use sizeof(*pointer) instead of sizeof(type)). Signed-off-by: Wentong Tian <tianwentong2000@gmail.com> Link: https://patch.msgid.link/20260112162709.89515-1-tianwentong2000@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 3033da6 commit 6cebd8e

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/input/serio/altera_ps2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static int altera_ps2_probe(struct platform_device *pdev)
8181
struct serio *serio;
8282
int error, irq;
8383

84-
ps2if = devm_kzalloc(&pdev->dev, sizeof(struct ps2if), GFP_KERNEL);
84+
ps2if = devm_kzalloc(&pdev->dev, sizeof(*ps2if), GFP_KERNEL);
8585
if (!ps2if)
8686
return -ENOMEM;
8787

drivers/input/serio/arc_ps2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ static int arc_ps2_probe(struct platform_device *pdev)
189189
if (irq < 0)
190190
return -EINVAL;
191191

192-
arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data),
193-
GFP_KERNEL);
192+
arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(*arc_ps2), GFP_KERNEL);
194193
if (!arc_ps2) {
195194
dev_err(&pdev->dev, "out of memory\n");
196195
return -ENOMEM;

drivers/input/serio/olpc_apsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static int olpc_apsp_probe(struct platform_device *pdev)
171171
struct olpc_apsp *priv;
172172
int error;
173173

174-
priv = devm_kzalloc(&pdev->dev, sizeof(struct olpc_apsp), GFP_KERNEL);
174+
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
175175
if (!priv)
176176
return -ENOMEM;
177177

0 commit comments

Comments
 (0)