diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-01-28 09:30:32 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-01-28 09:30:32 -0500 |
| commit | 41ca5d4e9be11ea6ae040b51d9628a189fd82896 (patch) | |
| tree | f9c35cc37b9622f6cccd91b94548f44b9a534029 /drivers/usb/phy/phy.c | |
| parent | 0fcedc8631ec28ca25d3c0b116e8fa0c19dd5f6d (diff) | |
| parent | 3669ef9fa7d35f573ec9c0e0341b29251c2734a7 (diff) | |
Merge commit 3669ef9fa7d3 ("x86, tls: Interpret an all-zero struct user_desc as 'no segment'") into x86/asm
Pick up the latestest asm fixes before advancing it any further.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/usb/phy/phy.c')
| -rw-r--r-- | drivers/usb/phy/phy.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index b4066a001ba0..ccfdfb24b240 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c | |||
| @@ -34,7 +34,7 @@ static struct usb_phy *__usb_find_phy(struct list_head *list, | |||
| 34 | return phy; | 34 | return phy; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | return ERR_PTR(-ENODEV); | 37 | return ERR_PTR(-EPROBE_DEFER); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | static struct usb_phy *__usb_find_phy_dev(struct device *dev, | 40 | static struct usb_phy *__usb_find_phy_dev(struct device *dev, |
| @@ -59,6 +59,9 @@ static struct usb_phy *__of_usb_find_phy(struct device_node *node) | |||
| 59 | { | 59 | { |
| 60 | struct usb_phy *phy; | 60 | struct usb_phy *phy; |
| 61 | 61 | ||
| 62 | if (!of_device_is_available(node)) | ||
| 63 | return ERR_PTR(-ENODEV); | ||
| 64 | |||
| 62 | list_for_each_entry(phy, &phy_list, head) { | 65 | list_for_each_entry(phy, &phy_list, head) { |
| 63 | if (node != phy->dev->of_node) | 66 | if (node != phy->dev->of_node) |
| 64 | continue; | 67 | continue; |
| @@ -66,7 +69,7 @@ static struct usb_phy *__of_usb_find_phy(struct device_node *node) | |||
| 66 | return phy; | 69 | return phy; |
| 67 | } | 70 | } |
| 68 | 71 | ||
| 69 | return ERR_PTR(-ENODEV); | 72 | return ERR_PTR(-EPROBE_DEFER); |
| 70 | } | 73 | } |
| 71 | 74 | ||
| 72 | static void devm_usb_phy_release(struct device *dev, void *res) | 75 | static void devm_usb_phy_release(struct device *dev, void *res) |
| @@ -190,10 +193,13 @@ struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, | |||
| 190 | spin_lock_irqsave(&phy_lock, flags); | 193 | spin_lock_irqsave(&phy_lock, flags); |
| 191 | 194 | ||
| 192 | phy = __of_usb_find_phy(node); | 195 | phy = __of_usb_find_phy(node); |
| 193 | if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { | 196 | if (IS_ERR(phy)) { |
| 194 | if (!IS_ERR(phy)) | 197 | devres_free(ptr); |
| 195 | phy = ERR_PTR(-EPROBE_DEFER); | 198 | goto err1; |
| 199 | } | ||
| 196 | 200 | ||
| 201 | if (!try_module_get(phy->dev->driver->owner)) { | ||
| 202 | phy = ERR_PTR(-ENODEV); | ||
| 197 | devres_free(ptr); | 203 | devres_free(ptr); |
| 198 | goto err1; | 204 | goto err1; |
| 199 | } | 205 | } |
