diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-11-23 08:14:42 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-12-05 17:22:58 +0100 |
commit | 840414ae59d8858bca0a704e7f9c910d661348d7 (patch) | |
tree | c0e6a80272ff60ce3c02cf3a3c181887f082ddf9 /drivers/i3c | |
parent | i3c: master: dw: fix mask operation by using the correct operator (diff) | |
download | linux-840414ae59d8858bca0a704e7f9c910d661348d7.tar.xz linux-840414ae59d8858bca0a704e7f9c910d661348d7.zip |
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: 3a379bbcea0a ("i3c: Add core I3C infrastructure")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/i3c')
-rw-r--r-- | drivers/i3c/master.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 0ea7bb045fad..bda4b9613e53 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -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) |