Преглед на файлове

soc: swr-mstr-ctrl: fix device linked list corruption issue

It was found that kernel crashes due to device linked list corruption
when soundwire controller driver tries to register soundwire peripheral
device. This is due to error handling logic does not remove device which
fails to register from device linked list maintained by soundwire
controller driver.

Change-Id: I0bb52bbc11bc4535f22c0490edb9c4aee48050dc
Signed-off-by: Patrick Lai <[email protected]>
Patrick Lai преди 4 години
родител
ревизия
721e71211c
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      soc/soundwire.c

+ 1 - 0
soc/soundwire.c

@@ -141,6 +141,7 @@ err_out:
 	dev_dbg(&master->dev, "Failed to register swr device %s at 0x%lx %d\n",
 		swr->name, swr->addr, result);
 	swr_master_put(master);
+	list_del_init(&swr->dev_list);	
 	kfree(swr);
 	return NULL;
 }