瀏覽代碼

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;
 }