.. | .. |
---|
141 | 141 | struct regmap *grf; |
---|
142 | 142 | int um_ls_irq; |
---|
143 | 143 | struct clk *clks[U3PHY_MAX_CLKS]; |
---|
144 | | - struct dentry *root; |
---|
145 | 144 | struct regulator *vbus; |
---|
146 | 145 | struct reset_control *rsts[U3PHY_RESET_MAX]; |
---|
147 | 146 | struct rockchip_u3phy_apbcfg apbcfg; |
---|
.. | .. |
---|
294 | 293 | .release = single_release, |
---|
295 | 294 | }; |
---|
296 | 295 | |
---|
297 | | -int rockchip_u3phy_debugfs_init(struct rockchip_u3phy *u3phy) |
---|
| 296 | +static void rockchip_u3phy_debugfs_init(struct rockchip_u3phy *u3phy) |
---|
298 | 297 | { |
---|
299 | 298 | struct dentry *root; |
---|
300 | | - struct dentry *file; |
---|
301 | | - int ret; |
---|
302 | 299 | |
---|
303 | 300 | 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); |
---|
323 | 303 | } |
---|
324 | 304 | |
---|
325 | 305 | static const char *get_rest_name(enum rockchip_u3phy_rest_req rst) |
---|
.. | .. |
---|
608 | 588 | dev_dbg(&u3phy_port->phy->dev, "FS/LS online\n"); |
---|
609 | 589 | break; |
---|
610 | 590 | } |
---|
611 | | - /* fall through */ |
---|
| 591 | + fallthrough; |
---|
612 | 592 | case PHY_UTMI_CONNECT: |
---|
613 | 593 | if (u3phy_port->suspended) { |
---|
614 | 594 | dev_dbg(&u3phy_port->phy->dev, "Connected\n"); |
---|
.. | .. |
---|
933 | 913 | } |
---|
934 | 914 | |
---|
935 | 915 | 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); |
---|
937 | 918 | goto put_child; |
---|
| 919 | + } |
---|
938 | 920 | |
---|
939 | 921 | rockchip_u3phy_rest_deassert(u3phy, U3PHY_MAC_RST); |
---|
940 | 922 | rockchip_u3phy_clk_disable(u3phy); |
---|