diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2024-09-16 10:20:12 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-09-30 01:11:00 +0200 |
commit | 0e9f73f109025f0d5d16b104b6684e6c03aa0c83 (patch) | |
tree | e4635424c5f195a8d6db7baa8bf421b51f415edc | |
parent | 9e3da79544de209c006b6b4c1514be52a48a2c1d (diff) |
ASoC: tas5805m: Improve a size determination in tas5805m_i2c_probe()
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://patch.msgid.link/6a6c87d3-9e4f-4980-ae06-b0d5e16dd0c0@web.de
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/tas5805m.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/tas5805m.c b/sound/soc/codecs/tas5805m.c index 3b53eba38a0b..4c32500eef3e 100644 --- a/sound/soc/codecs/tas5805m.c +++ b/sound/soc/codecs/tas5805m.c @@ -474,7 +474,7 @@ static int tas5805m_i2c_probe(struct i2c_client *i2c) return ret; } - tas5805m = devm_kzalloc(dev, sizeof(struct tas5805m_priv), GFP_KERNEL); + tas5805m = devm_kzalloc(dev, sizeof(*tas5805m), GFP_KERNEL); if (!tas5805m) return -ENOMEM; |