mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 01:24:12 +08:00
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>
This commit is contained in:
parent
9e3da79544
commit
0e9f73f109
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user