Ajit Kumar Pandey
4bf5bc44ea
ASoC: SOF: Fix NULL pointer exception in sof_pci_probe callback
...
[ Upstream commit c61711c1c95791850be48dd65a1d72eb34ba719f ]
We are accessing "desc->ops" in sof_pci_probe without checking "desc"
pointer. This results in NULL pointer exception if pci_id->driver_data
i.e desc pointer isn't defined in sof device probe:
BUG: kernel NULL pointer dereference, address: 0000000000000060
PGD 0 P4D 0
Oops: 0000 [#1 ] PREEMPT SMP NOPTI
RIP: 0010:sof_pci_probe+0x1e/0x17f [snd_sof_pci]
Code: Unable to access opcode bytes at RIP 0xffffffffc043dff4.
RSP: 0018:ffffac4b03b9b8d8 EFLAGS: 00010246
Add NULL pointer check for sof_dev_desc pointer to avoid such exception.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220426183357.102155-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:26:52 +02:00
..
2021-07-21 11:53:42 +02:00
2021-09-03 15:33:47 -07:00
2021-08-04 08:08:21 +02:00
2022-04-20 09:34:19 +02:00
2022-04-20 09:34:12 +02:00
2022-05-12 12:30:01 +02:00
2022-01-27 11:04:07 +01:00
2021-06-12 09:32:14 +02:00
2022-04-20 09:34:08 +02:00
2021-06-12 09:31:13 +02:00
2021-05-27 08:24:23 +02:00
2021-09-02 13:16:00 -07:00
2022-05-12 12:30:01 +02:00
2021-07-19 16:17:09 +02:00
2021-06-16 08:52:29 +02:00
2021-03-17 13:16:18 -07:00
2022-05-18 10:26:52 +02:00
2021-06-09 17:30:29 +02:00
2022-04-08 14:23:19 +02:00
2021-11-18 19:15:55 +01:00
2022-04-27 14:38:55 +02:00
2021-04-27 08:39:39 +02:00
2022-04-20 09:34:07 +02:00
2021-03-17 13:16:18 -07:00
2021-03-07 09:07:16 +01:00
2021-03-07 09:07:16 +01:00