projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
918aaae
)
phy: ti: Use IS_ERR_OR_NULL() to clean code
author
Miaoqian Lin
<linmq006@gmail.com>
Sun, 12 Dec 2021 14:22:21 +0000
(14:22 +0000)
committer
Vinod Koul
<vkoul@kernel.org>
Tue, 14 Dec 2021 07:40:03 +0000
(13:10 +0530)
Use IS_ERR_OR_NULL() to make the code cleaner.
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link:
https://lore.kernel.org/r/20211212142226.23674-1-linmq006@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/ti/phy-omap-control.c
patch
|
blob
|
history
diff --git
a/drivers/phy/ti/phy-omap-control.c
b/drivers/phy/ti/phy-omap-control.c
index
47482f1
..
76c5595
100644
(file)
--- a/
drivers/phy/ti/phy-omap-control.c
+++ b/
drivers/phy/ti/phy-omap-control.c
@@
-26,7
+26,7
@@
void omap_control_pcie_pcs(struct device *dev, u8 delay)
u32 val;
struct omap_control_phy *control_phy;
- if (IS_ERR
(dev) || !dev
) {
+ if (IS_ERR
_OR_NULL(dev)
) {
pr_err("%s: invalid device\n", __func__);
return;
}
@@
-61,7
+61,7
@@
void omap_control_phy_power(struct device *dev, int on)
unsigned long rate;
struct omap_control_phy *control_phy;
- if (IS_ERR
(dev) || !dev
) {
+ if (IS_ERR
_OR_NULL(dev)
) {
pr_err("%s: invalid device\n", __func__);
return;
}
@@
-202,7
+202,7
@@
void omap_control_usb_set_mode(struct device *dev,
{
struct omap_control_phy *ctrl_phy;
- if (IS_ERR
(dev) || !dev
)
+ if (IS_ERR
_OR_NULL(dev)
)
return;
ctrl_phy = dev_get_drvdata(dev);