treewide: remove redundant IS_ERR() before error code check
'PTR_ERR(p) == -E*' is a stronger condition than IS_ERR(p). Hence, IS_ERR(p) is unneeded. The semantic patch that generates this commit is as follows: // <smpl> @@ expression ptr; constant error_code; @@ -IS_ERR(ptr) && (PTR_ERR(ptr) == - error_code) +PTR_ERR(ptr) == - error_code // </smpl> Link: http://lkml.kernel.org/r/20200106045833.1725-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Cc: Julia Lawall <julia.lawall@lip6.fr> Acked-by: Stephen Boyd <sboyd@kernel.org> [drivers/clk/clk.c] Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> [GPIO] Acked-by: Wolfram Sang <wsa@the-dreams.de> [drivers/i2c] Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> [acpi/scan.c] Acked-by: Rob Herring <robh@kernel.org> Cc: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
190535f7cf
commit
45586c7078
|
@ -171,7 +171,7 @@ static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||||
sa->salg_name[sizeof(sa->salg_name) + addr_len - sizeof(*sa) - 1] = 0;
|
sa->salg_name[sizeof(sa->salg_name) + addr_len - sizeof(*sa) - 1] = 0;
|
||||||
|
|
||||||
type = alg_get_type(sa->salg_type);
|
type = alg_get_type(sa->salg_type);
|
||||||
if (IS_ERR(type) && PTR_ERR(type) == -ENOENT) {
|
if (PTR_ERR(type) == -ENOENT) {
|
||||||
request_module("algif-%s", sa->salg_type);
|
request_module("algif-%s", sa->salg_type);
|
||||||
type = alg_get_type(sa->salg_type);
|
type = alg_get_type(sa->salg_type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1462,7 +1462,7 @@ int acpi_dma_configure(struct device *dev, enum dev_dma_attr attr)
|
||||||
iort_dma_setup(dev, &dma_addr, &size);
|
iort_dma_setup(dev, &dma_addr, &size);
|
||||||
|
|
||||||
iommu = iort_iommu_configure(dev);
|
iommu = iort_iommu_configure(dev);
|
||||||
if (IS_ERR(iommu) && PTR_ERR(iommu) == -EPROBE_DEFER)
|
if (PTR_ERR(iommu) == -EPROBE_DEFER)
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
arch_setup_dma_ops(dev, dma_addr, size,
|
arch_setup_dma_ops(dev, dma_addr, size,
|
||||||
|
|
|
@ -157,7 +157,7 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
/* Clock is optional on most platforms */
|
/* Clock is optional on most platforms */
|
||||||
priv->clk = devm_clk_get(dev, NULL);
|
priv->clk = devm_clk_get(dev, NULL);
|
||||||
if (IS_ERR(priv->clk) && PTR_ERR(priv->clk) == -EPROBE_DEFER)
|
if (PTR_ERR(priv->clk) == -EPROBE_DEFER)
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
priv->rng.name = pdev->name;
|
priv->rng.name = pdev->name;
|
||||||
|
|
|
@ -476,7 +476,7 @@ static int omap_rng_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->clk = devm_clk_get(&pdev->dev, NULL);
|
priv->clk = devm_clk_get(&pdev->dev, NULL);
|
||||||
if (IS_ERR(priv->clk) && PTR_ERR(priv->clk) == -EPROBE_DEFER)
|
if (PTR_ERR(priv->clk) == -EPROBE_DEFER)
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
if (!IS_ERR(priv->clk)) {
|
if (!IS_ERR(priv->clk)) {
|
||||||
ret = clk_prepare_enable(priv->clk);
|
ret = clk_prepare_enable(priv->clk);
|
||||||
|
@ -488,7 +488,7 @@ static int omap_rng_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->clk_reg = devm_clk_get(&pdev->dev, "reg");
|
priv->clk_reg = devm_clk_get(&pdev->dev, "reg");
|
||||||
if (IS_ERR(priv->clk_reg) && PTR_ERR(priv->clk_reg) == -EPROBE_DEFER)
|
if (PTR_ERR(priv->clk_reg) == -EPROBE_DEFER)
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
if (!IS_ERR(priv->clk_reg)) {
|
if (!IS_ERR(priv->clk_reg)) {
|
||||||
ret = clk_prepare_enable(priv->clk_reg);
|
ret = clk_prepare_enable(priv->clk_reg);
|
||||||
|
|
|
@ -429,7 +429,7 @@ static void clk_core_fill_parent_index(struct clk_core *core, u8 index)
|
||||||
parent = ERR_PTR(-EPROBE_DEFER);
|
parent = ERR_PTR(-EPROBE_DEFER);
|
||||||
} else {
|
} else {
|
||||||
parent = clk_core_get(core, index);
|
parent = clk_core_get(core, index);
|
||||||
if (IS_ERR(parent) && PTR_ERR(parent) == -ENOENT && entry->name)
|
if (PTR_ERR(parent) == -ENOENT && entry->name)
|
||||||
parent = clk_core_lookup(entry->name);
|
parent = clk_core_lookup(entry->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -750,7 +750,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
xor_dev->clk = devm_clk_get(&pdev->dev, NULL);
|
xor_dev->clk = devm_clk_get(&pdev->dev, NULL);
|
||||||
if (IS_ERR(xor_dev->clk) && PTR_ERR(xor_dev->clk) == -EPROBE_DEFER) {
|
if (PTR_ERR(xor_dev->clk) == -EPROBE_DEFER) {
|
||||||
ret = EPROBE_DEFER;
|
ret = EPROBE_DEFER;
|
||||||
goto disable_reg_clk;
|
goto disable_reg_clk;
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,7 +308,7 @@ devm_gpiod_get_array_optional(struct device *dev, const char *con_id,
|
||||||
struct gpio_descs *descs;
|
struct gpio_descs *descs;
|
||||||
|
|
||||||
descs = devm_gpiod_get_array(dev, con_id, flags);
|
descs = devm_gpiod_get_array(dev, con_id, flags);
|
||||||
if (IS_ERR(descs) && (PTR_ERR(descs) == -ENOENT))
|
if (PTR_ERR(descs) == -ENOENT)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return descs;
|
return descs;
|
||||||
|
|
|
@ -484,24 +484,24 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT) {
|
if (PTR_ERR(desc) == -ENOENT) {
|
||||||
/* Special handling for SPI GPIOs if used */
|
/* Special handling for SPI GPIOs if used */
|
||||||
desc = of_find_spi_gpio(dev, con_id, &of_flags);
|
desc = of_find_spi_gpio(dev, con_id, &of_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT) {
|
if (PTR_ERR(desc) == -ENOENT) {
|
||||||
/* This quirk looks up flags and all */
|
/* This quirk looks up flags and all */
|
||||||
desc = of_find_spi_cs_gpio(dev, con_id, idx, flags);
|
desc = of_find_spi_cs_gpio(dev, con_id, idx, flags);
|
||||||
if (!IS_ERR(desc))
|
if (!IS_ERR(desc))
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT) {
|
if (PTR_ERR(desc) == -ENOENT) {
|
||||||
/* Special handling for regulator GPIOs if used */
|
/* Special handling for regulator GPIOs if used */
|
||||||
desc = of_find_regulator_gpio(dev, con_id, &of_flags);
|
desc = of_find_regulator_gpio(dev, con_id, &of_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT)
|
if (PTR_ERR(desc) == -ENOENT)
|
||||||
desc = of_find_arizona_gpio(dev, con_id, &of_flags);
|
desc = of_find_arizona_gpio(dev, con_id, &of_flags);
|
||||||
|
|
||||||
if (IS_ERR(desc))
|
if (IS_ERR(desc))
|
||||||
|
|
|
@ -5039,7 +5039,7 @@ struct gpio_descs *__must_check gpiod_get_array_optional(struct device *dev,
|
||||||
struct gpio_descs *descs;
|
struct gpio_descs *descs;
|
||||||
|
|
||||||
descs = gpiod_get_array(dev, con_id, flags);
|
descs = gpiod_get_array(dev, con_id, flags);
|
||||||
if (IS_ERR(descs) && (PTR_ERR(descs) == -ENOENT))
|
if (PTR_ERR(descs) == -ENOENT)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return descs;
|
return descs;
|
||||||
|
|
|
@ -901,14 +901,13 @@ mv64xxx_i2c_probe(struct platform_device *pd)
|
||||||
|
|
||||||
/* Not all platforms have clocks */
|
/* Not all platforms have clocks */
|
||||||
drv_data->clk = devm_clk_get(&pd->dev, NULL);
|
drv_data->clk = devm_clk_get(&pd->dev, NULL);
|
||||||
if (IS_ERR(drv_data->clk) && PTR_ERR(drv_data->clk) == -EPROBE_DEFER)
|
if (PTR_ERR(drv_data->clk) == -EPROBE_DEFER)
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
if (!IS_ERR(drv_data->clk))
|
if (!IS_ERR(drv_data->clk))
|
||||||
clk_prepare_enable(drv_data->clk);
|
clk_prepare_enable(drv_data->clk);
|
||||||
|
|
||||||
drv_data->reg_clk = devm_clk_get(&pd->dev, "reg");
|
drv_data->reg_clk = devm_clk_get(&pd->dev, "reg");
|
||||||
if (IS_ERR(drv_data->reg_clk) &&
|
if (PTR_ERR(drv_data->reg_clk) == -EPROBE_DEFER)
|
||||||
PTR_ERR(drv_data->reg_clk) == -EPROBE_DEFER)
|
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
if (!IS_ERR(drv_data->reg_clk))
|
if (!IS_ERR(drv_data->reg_clk))
|
||||||
clk_prepare_enable(drv_data->reg_clk);
|
clk_prepare_enable(drv_data->reg_clk);
|
||||||
|
|
|
@ -553,7 +553,7 @@ static int synquacer_i2c_probe(struct platform_device *pdev)
|
||||||
&i2c->pclkrate);
|
&i2c->pclkrate);
|
||||||
|
|
||||||
i2c->pclk = devm_clk_get(&pdev->dev, "pclk");
|
i2c->pclk = devm_clk_get(&pdev->dev, "pclk");
|
||||||
if (IS_ERR(i2c->pclk) && PTR_ERR(i2c->pclk) == -EPROBE_DEFER)
|
if (PTR_ERR(i2c->pclk) == -EPROBE_DEFER)
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
if (!IS_ERR_OR_NULL(i2c->pclk)) {
|
if (!IS_ERR_OR_NULL(i2c->pclk)) {
|
||||||
dev_dbg(&pdev->dev, "clock source %p\n", i2c->pclk);
|
dev_dbg(&pdev->dev, "clock source %p\n", i2c->pclk);
|
||||||
|
|
|
@ -1180,7 +1180,7 @@ static struct mtd_info * __init open_mtd_device(const char *mtd_dev)
|
||||||
* MTD device name.
|
* MTD device name.
|
||||||
*/
|
*/
|
||||||
mtd = get_mtd_device_nm(mtd_dev);
|
mtd = get_mtd_device_nm(mtd_dev);
|
||||||
if (IS_ERR(mtd) && PTR_ERR(mtd) == -ENODEV)
|
if (PTR_ERR(mtd) == -ENODEV)
|
||||||
/* Probably this is an MTD character device node path */
|
/* Probably this is an MTD character device node path */
|
||||||
mtd = open_mtd_by_chdev(mtd_dev);
|
mtd = open_mtd_by_chdev(mtd_dev);
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -161,7 +161,7 @@ int of_dma_configure(struct device *dev, struct device_node *np, bool force_dma)
|
||||||
coherent ? " " : " not ");
|
coherent ? " " : " not ");
|
||||||
|
|
||||||
iommu = of_iommu_configure(dev, np);
|
iommu = of_iommu_configure(dev, np);
|
||||||
if (IS_ERR(iommu) && PTR_ERR(iommu) == -EPROBE_DEFER)
|
if (PTR_ERR(iommu) == -EPROBE_DEFER)
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
dev_dbg(dev, "device is%sbehind an iommu\n",
|
dev_dbg(dev, "device is%sbehind an iommu\n",
|
||||||
|
|
|
@ -1406,7 +1406,7 @@ static struct phy *devm_of_phy_optional_get_index(struct device *dev,
|
||||||
phy = devm_of_phy_get(dev, np, name);
|
phy = devm_of_phy_get(dev, np, name);
|
||||||
kfree(name);
|
kfree(name);
|
||||||
|
|
||||||
if (IS_ERR(phy) && PTR_ERR(phy) == -ENODEV)
|
if (PTR_ERR(phy) == -ENODEV)
|
||||||
phy = NULL;
|
phy = NULL;
|
||||||
|
|
||||||
return phy;
|
return phy;
|
||||||
|
|
|
@ -712,7 +712,7 @@ struct phy *phy_optional_get(struct device *dev, const char *string)
|
||||||
{
|
{
|
||||||
struct phy *phy = phy_get(dev, string);
|
struct phy *phy = phy_get(dev, string);
|
||||||
|
|
||||||
if (IS_ERR(phy) && (PTR_ERR(phy) == -ENODEV))
|
if (PTR_ERR(phy) == -ENODEV)
|
||||||
phy = NULL;
|
phy = NULL;
|
||||||
|
|
||||||
return phy;
|
return phy;
|
||||||
|
@ -766,7 +766,7 @@ struct phy *devm_phy_optional_get(struct device *dev, const char *string)
|
||||||
{
|
{
|
||||||
struct phy *phy = devm_phy_get(dev, string);
|
struct phy *phy = devm_phy_get(dev, string);
|
||||||
|
|
||||||
if (IS_ERR(phy) && (PTR_ERR(phy) == -ENODEV))
|
if (PTR_ERR(phy) == -ENODEV)
|
||||||
phy = NULL;
|
phy = NULL;
|
||||||
|
|
||||||
return phy;
|
return phy;
|
||||||
|
|
|
@ -646,8 +646,7 @@ static int orion_spi_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
/* The following clock is only used by some SoCs */
|
/* The following clock is only used by some SoCs */
|
||||||
spi->axi_clk = devm_clk_get(&pdev->dev, "axi");
|
spi->axi_clk = devm_clk_get(&pdev->dev, "axi");
|
||||||
if (IS_ERR(spi->axi_clk) &&
|
if (PTR_ERR(spi->axi_clk) == -EPROBE_DEFER) {
|
||||||
PTR_ERR(spi->axi_clk) == -EPROBE_DEFER) {
|
|
||||||
status = -EPROBE_DEFER;
|
status = -EPROBE_DEFER;
|
||||||
goto out_rel_clk;
|
goto out_rel_clk;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1017,7 +1017,7 @@ static int imxfb_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
fbi->lcd_pwr = devm_regulator_get(&pdev->dev, "lcd");
|
fbi->lcd_pwr = devm_regulator_get(&pdev->dev, "lcd");
|
||||||
if (IS_ERR(fbi->lcd_pwr) && (PTR_ERR(fbi->lcd_pwr) == -EPROBE_DEFER)) {
|
if (PTR_ERR(fbi->lcd_pwr) == -EPROBE_DEFER) {
|
||||||
ret = -EPROBE_DEFER;
|
ret = -EPROBE_DEFER;
|
||||||
goto failed_lcd;
|
goto failed_lcd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6043,7 +6043,7 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
|
||||||
bh = ext4_bread(handle, inode, blk,
|
bh = ext4_bread(handle, inode, blk,
|
||||||
EXT4_GET_BLOCKS_CREATE |
|
EXT4_GET_BLOCKS_CREATE |
|
||||||
EXT4_GET_BLOCKS_METADATA_NOFAIL);
|
EXT4_GET_BLOCKS_METADATA_NOFAIL);
|
||||||
} while (IS_ERR(bh) && (PTR_ERR(bh) == -ENOSPC) &&
|
} while (PTR_ERR(bh) == -ENOSPC &&
|
||||||
ext4_should_retry_alloc(inode->i_sb, &retries));
|
ext4_should_retry_alloc(inode->i_sb, &retries));
|
||||||
if (IS_ERR(bh))
|
if (IS_ERR(bh))
|
||||||
return PTR_ERR(bh);
|
return PTR_ERR(bh);
|
||||||
|
|
|
@ -875,7 +875,7 @@ static int truncate_dnode(struct dnode_of_data *dn)
|
||||||
|
|
||||||
/* get direct node */
|
/* get direct node */
|
||||||
page = f2fs_get_node_page(F2FS_I_SB(dn->inode), dn->nid);
|
page = f2fs_get_node_page(F2FS_I_SB(dn->inode), dn->nid);
|
||||||
if (IS_ERR(page) && PTR_ERR(page) == -ENOENT)
|
if (PTR_ERR(page) == -ENOENT)
|
||||||
return 1;
|
return 1;
|
||||||
else if (IS_ERR(page))
|
else if (IS_ERR(page))
|
||||||
return PTR_ERR(page);
|
return PTR_ERR(page);
|
||||||
|
|
|
@ -696,7 +696,7 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb,
|
||||||
|
|
||||||
bg_bh = ocfs2_block_group_alloc_contig(osb, handle, alloc_inode,
|
bg_bh = ocfs2_block_group_alloc_contig(osb, handle, alloc_inode,
|
||||||
ac, cl);
|
ac, cl);
|
||||||
if (IS_ERR(bg_bh) && (PTR_ERR(bg_bh) == -ENOSPC))
|
if (PTR_ERR(bg_bh) == -ENOSPC)
|
||||||
bg_bh = ocfs2_block_group_alloc_discontig(handle,
|
bg_bh = ocfs2_block_group_alloc_discontig(handle,
|
||||||
alloc_inode,
|
alloc_inode,
|
||||||
ac, cl);
|
ac, cl);
|
||||||
|
|
|
@ -449,7 +449,7 @@ int __compat_only_sysfs_link_entry_to_kobj(struct kobject *kobj,
|
||||||
}
|
}
|
||||||
|
|
||||||
link = kernfs_create_link(kobj->sd, target_name, entry);
|
link = kernfs_create_link(kobj->sd, target_name, entry);
|
||||||
if (IS_ERR(link) && PTR_ERR(link) == -EEXIST)
|
if (PTR_ERR(link) == -EEXIST)
|
||||||
sysfs_warn_dup(kobj->sd, target_name);
|
sysfs_warn_dup(kobj->sd, target_name);
|
||||||
|
|
||||||
kernfs_put(entry);
|
kernfs_put(entry);
|
||||||
|
|
|
@ -5792,7 +5792,7 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
|
||||||
if (&ptype->list == head)
|
if (&ptype->list == head)
|
||||||
goto normal;
|
goto normal;
|
||||||
|
|
||||||
if (IS_ERR(pp) && PTR_ERR(pp) == -EINPROGRESS) {
|
if (PTR_ERR(pp) == -EINPROGRESS) {
|
||||||
ret = GRO_CONSUMED;
|
ret = GRO_CONSUMED;
|
||||||
goto ok;
|
goto ok;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1573,7 +1573,7 @@ int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk)
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
prog = bpf_prog_get_type(ufd, BPF_PROG_TYPE_SOCKET_FILTER);
|
prog = bpf_prog_get_type(ufd, BPF_PROG_TYPE_SOCKET_FILTER);
|
||||||
if (IS_ERR(prog) && PTR_ERR(prog) == -EINVAL)
|
if (PTR_ERR(prog) == -EINVAL)
|
||||||
prog = bpf_prog_get_type(ufd, BPF_PROG_TYPE_SK_REUSEPORT);
|
prog = bpf_prog_get_type(ufd, BPF_PROG_TYPE_SK_REUSEPORT);
|
||||||
if (IS_ERR(prog))
|
if (IS_ERR(prog))
|
||||||
return PTR_ERR(prog);
|
return PTR_ERR(prog);
|
||||||
|
|
|
@ -3189,7 +3189,7 @@ struct dst_entry *xfrm_lookup_route(struct net *net, struct dst_entry *dst_orig,
|
||||||
flags | XFRM_LOOKUP_QUEUE |
|
flags | XFRM_LOOKUP_QUEUE |
|
||||||
XFRM_LOOKUP_KEEP_DST_REF);
|
XFRM_LOOKUP_KEEP_DST_REF);
|
||||||
|
|
||||||
if (IS_ERR(dst) && PTR_ERR(dst) == -EREMOTE)
|
if (PTR_ERR(dst) == -EREMOTE)
|
||||||
return make_blackhole(net, dst_orig->ops->family, dst_orig);
|
return make_blackhole(net, dst_orig->ops->family, dst_orig);
|
||||||
|
|
||||||
if (IS_ERR(dst))
|
if (IS_ERR(dst))
|
||||||
|
|
|
@ -295,8 +295,7 @@ static int ak4104_spi_probe(struct spi_device *spi)
|
||||||
|
|
||||||
reset_gpiod = devm_gpiod_get_optional(&spi->dev, "reset",
|
reset_gpiod = devm_gpiod_get_optional(&spi->dev, "reset",
|
||||||
GPIOD_OUT_HIGH);
|
GPIOD_OUT_HIGH);
|
||||||
if (IS_ERR(reset_gpiod) &&
|
if (PTR_ERR(reset_gpiod) == -EPROBE_DEFER)
|
||||||
PTR_ERR(reset_gpiod) == -EPROBE_DEFER)
|
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
/* read the 'reserved' register - according to the datasheet, it
|
/* read the 'reserved' register - according to the datasheet, it
|
||||||
|
|
|
@ -681,8 +681,7 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
|
||||||
|
|
||||||
reset_gpiod = devm_gpiod_get_optional(&i2c_client->dev, "reset",
|
reset_gpiod = devm_gpiod_get_optional(&i2c_client->dev, "reset",
|
||||||
GPIOD_OUT_HIGH);
|
GPIOD_OUT_HIGH);
|
||||||
if (IS_ERR(reset_gpiod) &&
|
if (PTR_ERR(reset_gpiod) == -EPROBE_DEFER)
|
||||||
PTR_ERR(reset_gpiod) == -EPROBE_DEFER)
|
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
cs4270->regmap = devm_regmap_init_i2c(i2c_client, &cs4270_regmap);
|
cs4270->regmap = devm_regmap_init_i2c(i2c_client, &cs4270_regmap);
|
||||||
|
|
|
@ -1098,11 +1098,9 @@ static int aic32x4_setup_regulators(struct device *dev,
|
||||||
return PTR_ERR(aic32x4->supply_av);
|
return PTR_ERR(aic32x4->supply_av);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_ERR(aic32x4->supply_dv) &&
|
if (PTR_ERR(aic32x4->supply_dv) == -EPROBE_DEFER)
|
||||||
PTR_ERR(aic32x4->supply_dv) == -EPROBE_DEFER)
|
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
if (IS_ERR(aic32x4->supply_av) &&
|
if (PTR_ERR(aic32x4->supply_av) == -EPROBE_DEFER)
|
||||||
PTR_ERR(aic32x4->supply_av) == -EPROBE_DEFER)
|
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -555,7 +555,7 @@ static int sun4i_spdif_probe(struct platform_device *pdev)
|
||||||
if (quirks->has_reset) {
|
if (quirks->has_reset) {
|
||||||
host->rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
|
host->rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
|
||||||
NULL);
|
NULL);
|
||||||
if (IS_ERR(host->rst) && PTR_ERR(host->rst) == -EPROBE_DEFER) {
|
if (PTR_ERR(host->rst) == -EPROBE_DEFER) {
|
||||||
ret = -EPROBE_DEFER;
|
ret = -EPROBE_DEFER;
|
||||||
dev_err(&pdev->dev, "Failed to get reset: %d\n", ret);
|
dev_err(&pdev->dev, "Failed to get reset: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue