All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] ASoC: SOF: avoid a NULL dereference with unsupported widgets
@ 2023-03-31  6:58 Dan Carpenter
  2023-03-31  7:14 ` Péter Ujfalusi
  0 siblings, 1 reply; 9+ messages in thread
From: Dan Carpenter @ 2023-03-31  6:58 UTC (permalink / raw)
  To: guennadi.liakhovetski; +Cc: alsa-devel

Hello Guennadi Liakhovetski,

This is a semi-automatic email about new static checker warnings.

The patch e3720f92e023: "ASoC: SOF: avoid a NULL dereference with 
unsupported widgets" from Mar 29, 2023, leads to the following Smatch 
complaint:

sound/soc/sof/ipc4-topology.c:2353 sof_ipc4_route_setup()
error: we previously assumed 'sink_fw_module' could be null (see line 2351)

sound/soc/sof/ipc4-topology.c:2353 sof_ipc4_route_setup()
error: we previously assumed 'src_fw_module' could be null (see line 2351)

sound/soc/sof/ipc4-topology.c
  2350	
  2351		if (!src_fw_module || !sink_fw_module) {
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
One of these is NULL.

  2352			/* The NULL module will print as "(efault)" */
  2353			dev_err(sdev->dev, "source %s or sink %s widget weren't set up properly\n",
  2354				src_fw_module->man4_module_entry.name,
  2355				sink_fw_module->man4_module_entry.name);
                                ^^^^^^^^^^^^^^
Both are dereferenced.  The comment is very puzzling.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-04-13  4:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-31  6:58 [bug report] ASoC: SOF: avoid a NULL dereference with unsupported widgets Dan Carpenter
2023-03-31  7:14 ` Péter Ujfalusi
2023-04-01  7:44   ` Dan Carpenter
2023-04-03  5:20     ` Péter Ujfalusi
2023-04-03  5:54       ` Dan Carpenter
2023-04-03  7:08         ` Péter Ujfalusi
2023-04-11 16:22           ` Guennadi Liakhovetski
2023-04-13  4:41             ` Dan Carpenter
2023-04-13  4:46               ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.