Skip to contentSkip to conversation

soc: mediatek: mtk-svs: delete node name check

PATCH Applied [email protected] 4 participants 4 messages Feb 9, 2023 – Feb 14, 2023 Arm MediaTek

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: mediatek: mtk-svs: delete node name check

From: Matthias Brugger <[email protected]>

The function svs_add_device_link is called only internally from the SoC specific probe functions. We don't need to check if the node_name is null because that would mean that we have a buggy SoC probe function in the first place.

---

 drivers/soc/mediatek/mtk-svs.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/soc/mediatek/mtk-svs.c +0 -5
index 299f580847bdc..a7eb019b5157d 100644
@@ -2027,11 +2027,6 @@ static struct device *svs_add_device_link(struct svs_platform *svsp,
 	struct device *dev;
 	struct device_link *sup_link;
 
-	if (!node_name) {
-		dev_err(svsp->dev, "node name cannot be null\n");
-		return ERR_PTR(-EINVAL);
-	}
-
 	dev = svs_get_subsys_device(svsp, node_name);
 	if (IS_ERR(dev))
 		return dev;
Signature · 1 line
2.39.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Il 09/02/23 17:24, [email protected] ha scritto:

Quoted 8 lines

From: Matthias Brugger <[email protected]>

The function svs_add_device_link is called only internally from the SoC specific probe functions. We don't need to check if the node_name is null because that would mean that we have a buggy SoC probe function in the first place.

#2 lore raw
Quoted 8 lines · AngeloGioacchino Del Regno

Il 09/02/23 17:24, [email protected] ha scritto:

Quoted 7 lines

From: Matthias Brugger <[email protected]>

The function svs_add_device_link is called only internally from the SoC specific probe functions. We don't need to check if the node_name is null because that would mean that we have a buggy SoC probe function in the first place.

Quoted 4 lines
Quoted 1 line

Reviewed-by: AngeloGioacchino Del Regno <
[email protected]>

maintainer Applied
#3 lore raw
Quoted 9 lines · Roger Lu (陸瑞傑)
Quoted 8 lines · AngeloGioacchino Del Regno

Il 09/02/23 17:24, [email protected] ha scritto:

Quoted 7 lines

From: Matthias Brugger <[email protected]>

The function svs_add_device_link is called only internally from the SoC specific probe functions. We don't need to check if the node_name is null because that would mean that we have a buggy SoC probe function in the first place.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Reviewed-by: AngeloGioacchino Del Regno <
[email protected]>

Applied, thanks for the reviews.
Matthias