Commit cd1f0d3d authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915/dvo: Use sizeof(*variable) instead of sizeof(type)



Prefer sizeof(*variable) to sizeof(type) to make it a bit
harder to screw things up.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240208151720.7866-14-ville.syrjala@linux.intel.com


Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 8dc0e7df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ static bool ch7017_init(struct intel_dvo_device *dvo,
	const char *str;
	u8 val;

	priv = kzalloc(sizeof(struct ch7017_priv), GFP_KERNEL);
	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
	if (priv == NULL)
		return false;

+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
	u8 vendor, device;
	char *name, *devid;

	ch7xxx = kzalloc(sizeof(struct ch7xxx_priv), GFP_KERNEL);
	ch7xxx = kzalloc(sizeof(*ch7xxx), GFP_KERNEL);
	if (ch7xxx == NULL)
		return false;

+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ static bool ivch_init(struct intel_dvo_device *dvo,
	u16 temp;
	int i;

	priv = kzalloc(sizeof(struct ivch_priv), GFP_KERNEL);
	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
	if (priv == NULL)
		return false;

+1 −1
Original line number Diff line number Diff line
@@ -476,7 +476,7 @@ static bool ns2501_init(struct intel_dvo_device *dvo,
	struct ns2501_priv *ns;
	unsigned char ch;

	ns = kzalloc(sizeof(struct ns2501_priv), GFP_KERNEL);
	ns = kzalloc(sizeof(*ns), GFP_KERNEL);
	if (ns == NULL)
		return false;

+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ static bool sil164_init(struct intel_dvo_device *dvo,
	struct sil164_priv *sil;
	unsigned char ch;

	sil = kzalloc(sizeof(struct sil164_priv), GFP_KERNEL);
	sil = kzalloc(sizeof(*sil), GFP_KERNEL);
	if (sil == NULL)
		return false;

Loading