hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/phy/rockchip/phy-rockchip-inno-usb3.c
....@@ -141,7 +141,6 @@
141141 struct regmap *grf;
142142 int um_ls_irq;
143143 struct clk *clks[U3PHY_MAX_CLKS];
144
- struct dentry *root;
145144 struct regulator *vbus;
146145 struct reset_control *rsts[U3PHY_RESET_MAX];
147146 struct rockchip_u3phy_apbcfg apbcfg;
....@@ -294,32 +293,13 @@
294293 .release = single_release,
295294 };
296295
297
-int rockchip_u3phy_debugfs_init(struct rockchip_u3phy *u3phy)
296
+static void rockchip_u3phy_debugfs_init(struct rockchip_u3phy *u3phy)
298297 {
299298 struct dentry *root;
300
- struct dentry *file;
301
- int ret;
302299
303300 root = debugfs_create_dir(dev_name(u3phy->dev), NULL);
304
- if (!root) {
305
- ret = -ENOMEM;
306
- goto err0;
307
- }
308
-
309
- u3phy->root = root;
310
-
311
- file = debugfs_create_file("u3phy_mode", 0644, root,
312
- u3phy, &rockchip_u3phy_usb2_only_fops);
313
- if (!file) {
314
- ret = -ENOMEM;
315
- goto err1;
316
- }
317
- return 0;
318
-
319
-err1:
320
- debugfs_remove_recursive(root);
321
-err0:
322
- return ret;
301
+ debugfs_create_file("u3phy_mode", 0644, root,
302
+ u3phy, &rockchip_u3phy_usb2_only_fops);
323303 }
324304
325305 static const char *get_rest_name(enum rockchip_u3phy_rest_req rst)
....@@ -608,7 +588,7 @@
608588 dev_dbg(&u3phy_port->phy->dev, "FS/LS online\n");
609589 break;
610590 }
611
- /* fall through */
591
+ fallthrough;
612592 case PHY_UTMI_CONNECT:
613593 if (u3phy_port->suspended) {
614594 dev_dbg(&u3phy_port->phy->dev, "Connected\n");
....@@ -933,8 +913,10 @@
933913 }
934914
935915 provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
936
- if (IS_ERR_OR_NULL(provider))
916
+ if (IS_ERR(provider)) {
917
+ ret = PTR_ERR(provider);
937918 goto put_child;
919
+ }
938920
939921 rockchip_u3phy_rest_deassert(u3phy, U3PHY_MAC_RST);
940922 rockchip_u3phy_clk_disable(u3phy);