mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
i3c: fix an error code in i3c_master_add_i3c_dev_locked()
We should return "ret" as-is. The "newdev" variable is a valid pointer.
Fixes: 3a379bbcea
("i3c: Add core I3C infrastructure")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
This commit is contained in:
parent
2b2b283c05
commit
840414ae59
@ -1823,10 +1823,8 @@ int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master,
|
||||
return PTR_ERR(newdev);
|
||||
|
||||
ret = i3c_master_attach_i3c_dev(master, newdev);
|
||||
if (ret) {
|
||||
ret = PTR_ERR(newdev);
|
||||
if (ret)
|
||||
goto err_free_dev;
|
||||
}
|
||||
|
||||
ret = i3c_master_retrieve_dev_info(newdev);
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user