Skip to content

Commit 3aeb0d3

Browse files
Neha Malcom Francisnmenon
authored andcommitted
soc: ti: k3-socinfo: Avoid overriding return value
Avoid overriding the return value and make sure the right error code is reflected. If the part is none of the identified list present in k3_soc_ids[], return -ENODEV. Signed-off-by: Neha Malcom Francis <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Nishanth Menon <[email protected]>
1 parent 8dec342 commit 3aeb0d3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/soc/ti/k3-socinfo.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ k3_chipinfo_partno_to_names(unsigned int partno,
6060
return 0;
6161
}
6262

63-
return -EINVAL;
63+
return -ENODEV;
6464
}
6565

6666
static int k3_chipinfo_probe(struct platform_device *pdev)
@@ -111,8 +111,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
111111

112112
ret = k3_chipinfo_partno_to_names(partno_id, soc_dev_attr);
113113
if (ret) {
114-
dev_err(dev, "Unknown SoC JTAGID[0x%08X]\n", jtag_id);
115-
ret = -ENODEV;
114+
dev_err(dev, "Unknown SoC JTAGID[0x%08X]: %d\n", jtag_id, ret);
116115
goto err_free_rev;
117116
}
118117

0 commit comments

Comments
 (0)