9 Dec
2023
9 Dec
'23
9:10 a.m.
On Fri, 08 Dec 2023 19:06:49 +0100, Gergo Koteles wrote:
@@ -612,9 +612,13 @@ static void tas2781_hda_unbind(struct device *dev, { struct tasdevice_priv *tas_priv = dev_get_drvdata(dev); struct hda_component *comps = master_data;
- comps = &comps[tas_priv->index];
- if (comps[tas_priv->index].dev == dev)
memset(&comps[tas_priv->index], 0, sizeof(*comps));
- if (comps->dev == dev) {
comps->dev = NULL;
strscpy(comps->name, "", sizeof(comps->name));
This looks suboptimal. Either just set *comp->name = 0, or fill all with memset().
thanks,
Takashi