[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6a6c87d3-9e4f-4980-ae06-b0d5e16dd0c0@web.de>
Date: Mon, 16 Sep 2024 10:50:26 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: linux-sound@...r.kernel.org, Daniel Beer <daniel.beer@...rinstitute.com>,
Jaroslav Kysela <perex@...ex.cz>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Takashi Iwai <tiwai@...e.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Julia Lawall <julia.lawall@...ia.fr>
Subject: [PATCH 2/2] ASoC: tas5805m: Improve a size determination in
tas5805m_i2c_probe()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 16 Sep 2024 10:20:12 +0200
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@...rs.sourceforge.net>
---
sound/soc/codecs/tas5805m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tas5805m.c b/sound/soc/codecs/tas5805m.c
index f37eec960364..d4f028451071 100644
--- a/sound/soc/codecs/tas5805m.c
+++ b/sound/soc/codecs/tas5805m.c
@@ -473,7 +473,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;
--
2.46.0
Powered by blists - more mailing lists