Skip to content

Commit

Permalink
phy: ti: Use IS_ERR_OR_NULL() to clean code
Browse files Browse the repository at this point in the history
Use IS_ERR_OR_NULL() to make the code cleaner.

Signed-off-by: Miaoqian Lin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
Yuuoniy authored and vinodkoul committed Dec 14, 2021
1 parent 918aaae commit 16c57ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/phy/ti/phy-omap-control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 16c57ff

Please sign in to comment.