Commit 06b449d7 authored by Erick Archer's avatar Erick Archer Committed by Dmitry Torokhov
Browse files

Input: serio - 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: default avatarErick Archer <erick.archer@outlook.com>
Link: https://lore.kernel.org/r/AS8PR02MB7237D3D898CCC9C50C18DE078BFB2@AS8PR02MB7237.eurprd02.prod.outlook.com


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 18547925
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ static int altera_ps2_probe(struct platform_device *pdev)
		return error;
	}

	serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
	serio = kzalloc(sizeof(*serio), GFP_KERNEL);
	if (!serio)
		return -ENOMEM;

+2 −2
Original line number Diff line number Diff line
@@ -114,8 +114,8 @@ static int amba_kmi_probe(struct amba_device *dev,
	if (ret)
		return ret;

	kmi = kzalloc(sizeof(struct amba_kmi_port), GFP_KERNEL);
	io = kzalloc(sizeof(struct serio), GFP_KERNEL);
	kmi = kzalloc(sizeof(*kmi), GFP_KERNEL);
	io = kzalloc(sizeof(*io), GFP_KERNEL);
	if (!kmi || !io) {
		ret = -ENOMEM;
		goto out;
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ static int apbps2_of_probe(struct platform_device *ofdev)
	/* Set reload register to core freq in kHz/10 */
	iowrite32be(freq_hz / 10000, &priv->regs->reload);

	priv->io = kzalloc(sizeof(struct serio), GFP_KERNEL);
	priv->io = kzalloc(sizeof(*priv->io), GFP_KERNEL);
	if (!priv->io)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ static int arc_ps2_create_port(struct platform_device *pdev,
	struct arc_ps2_port *port = &arc_ps2->port[index];
	struct serio *io;

	io = kzalloc(sizeof(struct serio), GFP_KERNEL);
	io = kzalloc(sizeof(*io), GFP_KERNEL);
	if (!io)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ static int __init ct82c710_detect(void)

static int ct82c710_probe(struct platform_device *dev)
{
	ct82c710_port = kzalloc(sizeof(struct serio), GFP_KERNEL);
	ct82c710_port = kzalloc(sizeof(*ct82c710_port), GFP_KERNEL);
	if (!ct82c710_port)
		return -ENOMEM;

Loading