i2c: don't print error when adding adapter fails
authorWolfram Sang <wsa-dev@sang-engineering.com>
Tue, 9 Aug 2016 11:36:17 +0000 (13:36 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 22 Aug 2016 06:19:55 +0000 (08:19 +0200)
The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
53 files changed:
drivers/i2c/busses/i2c-amd756.c
drivers/i2c/busses/i2c-at91.c
drivers/i2c/busses/i2c-axxia.c
drivers/i2c/busses/i2c-bcm-iproc.c
drivers/i2c/busses/i2c-bcm-kona.c
drivers/i2c/busses/i2c-bfin-twi.c
drivers/i2c/busses/i2c-brcmstb.c
drivers/i2c/busses/i2c-cadence.c
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-cros-ec-tunnel.c
drivers/i2c/busses/i2c-davinci.c
drivers/i2c/busses/i2c-diolan-u2c.c
drivers/i2c/busses/i2c-dln2.c
drivers/i2c/busses/i2c-efm32.c
drivers/i2c/busses/i2c-exynos5.c
drivers/i2c/busses/i2c-hix5hd2.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-ibm_iic.c
drivers/i2c/busses/i2c-img-scb.c
drivers/i2c/busses/i2c-imx.c
drivers/i2c/busses/i2c-isch.c
drivers/i2c/busses/i2c-ismt.c
drivers/i2c/busses/i2c-jz4780.c
drivers/i2c/busses/i2c-lpc2k.c
drivers/i2c/busses/i2c-meson.c
drivers/i2c/busses/i2c-mpc.c
drivers/i2c/busses/i2c-mt65xx.c
drivers/i2c/busses/i2c-mxs.c
drivers/i2c/busses/i2c-nforce2.c
drivers/i2c/busses/i2c-nomadik.c
drivers/i2c/busses/i2c-ocores.c
drivers/i2c/busses/i2c-octeon.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-piix4.c
drivers/i2c/busses/i2c-pmcmsp.c
drivers/i2c/busses/i2c-pnx.c
drivers/i2c/busses/i2c-puv3.c
drivers/i2c/busses/i2c-pxa.c
drivers/i2c/busses/i2c-rcar.c
drivers/i2c/busses/i2c-riic.c
drivers/i2c/busses/i2c-rk3x.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/i2c/busses/i2c-sh7760.c
drivers/i2c/busses/i2c-sh_mobile.c
drivers/i2c/busses/i2c-sirf.c
drivers/i2c/busses/i2c-st.c
drivers/i2c/busses/i2c-stu300.c
drivers/i2c/busses/i2c-tegra.c
drivers/i2c/busses/i2c-wmt.c
drivers/i2c/busses/i2c-xgene-slimpro.c
drivers/i2c/busses/i2c-xiic.c
drivers/i2c/busses/i2c-xlp9xx.c
drivers/i2c/busses/i2c-xlr.c

index 6c7113d990f882a758435eb78fc172510a6faed6..274908cd1fdeabc4a76f8c9e58e7b3a52cc20401 100644 (file)
@@ -378,11 +378,8 @@ static int amd756_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                 amd756_ioport);
 
        error = i2c_add_adapter(&amd756_smbus);
-       if (error) {
-               dev_err(&pdev->dev,
-                       "Adapter registration failed, module not inserted\n");
+       if (error)
                goto out_err;
-       }
 
        return 0;
 
index 1bb97f658b47a1fa4c5b15e85779fa5160c6c3e6..0b86c6173e073806a4d0021a6f98cacfa082566a 100644 (file)
@@ -1122,8 +1122,6 @@ static int at91_twi_probe(struct platform_device *pdev)
 
        rc = i2c_add_numbered_adapter(&dev->adapter);
        if (rc) {
-               dev_err(dev->dev, "Adapter %s registration failed\n",
-                       dev->adapter.name);
                clk_disable_unprepare(dev->clk);
 
                pm_runtime_disable(dev->dev);
index c335cc7852f94ef0b08525901c03eb8b38ec76ae..d3bcaf4ab095d060bbff95db26ff830ec8b4a2a8 100644 (file)
@@ -558,13 +558,7 @@ static int axxia_i2c_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, idev);
 
-       ret = i2c_add_adapter(&idev->adapter);
-       if (ret) {
-               dev_err(&pdev->dev, "failed to add adapter\n");
-               return ret;
-       }
-
-       return 0;
+       return i2c_add_adapter(&idev->adapter);
 }
 
 static int axxia_i2c_remove(struct platform_device *pdev)
index 95f7cac76f89bfeac68ad22521d8c38c2df348c8..326b3db02c48b2cfce1591243e5db8e9b57855ba 100644 (file)
@@ -488,13 +488,7 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev)
        adap->dev.parent = &pdev->dev;
        adap->dev.of_node = pdev->dev.of_node;
 
-       ret = i2c_add_adapter(adap);
-       if (ret) {
-               dev_err(iproc_i2c->device, "failed to add adapter\n");
-               return ret;
-       }
-
-       return 0;
+       return i2c_add_adapter(adap);
 }
 
 static int bcm_iproc_i2c_remove(struct platform_device *pdev)
index f98743277e3c7491ac7063fa9c57cddc5dc1d229..d8494f8c9bd4851f1ba585d73f21b0abe9cf9331 100644 (file)
@@ -858,10 +858,8 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev)
        adap->dev.of_node = pdev->dev.of_node;
 
        rc = i2c_add_adapter(adap);
-       if (rc) {
-               dev_err(dev->device, "failed to add adapter\n");
+       if (rc)
                return rc;
-       }
 
        dev_info(dev->device, "device registered successfully\n");
 
index 025686d4164058498216862d37af9ad114fe4fa2..29d00c4f7824c2b3a9deaa41749567a07eb2c123 100644 (file)
@@ -685,10 +685,8 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev)
        write_CONTROL(iface, read_CONTROL(iface) | TWI_ENA);
 
        rc = i2c_add_numbered_adapter(p_adap);
-       if (rc < 0) {
-               dev_err(&pdev->dev, "Can't add i2c adapter!\n");
+       if (rc < 0)
                goto out_error;
-       }
 
        platform_set_drvdata(pdev, iface);
 
index 385b57bfcb386ce8754892741584fd30a10b3b47..0652281662a8b35b974d084c5d0636f8ac75e450 100644 (file)
@@ -648,10 +648,8 @@ static int brcmstb_i2c_probe(struct platform_device *pdev)
        adap->dev.parent = &pdev->dev;
        adap->dev.of_node = pdev->dev.of_node;
        rc = i2c_add_adapter(adap);
-       if (rc) {
-               dev_err(dev->device, "failed to add adapter\n");
+       if (rc)
                goto probe_errorout;
-       }
 
        dev_info(dev->device, "%s@%dhz registered in %s mode\n",
                 int_name ? int_name : " ", dev->clk_freq_hz,
index 90bbd9f9dd8f778422d54d1cc988b67409588f08..1cc1e79e958d56eaca6b06f3bd6f6fa4e0621478 100644 (file)
@@ -963,10 +963,8 @@ static int cdns_i2c_probe(struct platform_device *pdev)
        }
 
        ret = i2c_add_adapter(&id->adap);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "reg adap failed: %d\n", ret);
+       if (ret < 0)
                goto err_clk_dis;
-       }
 
        /*
         * Cadence I2C controller has a bug wherein it generates
index ee57c1e865e271228a38484d03c1c02c979fa7a9..d89bde2c5da256ecff87c4bd6ba1fc6fc3a2f4b0 100644 (file)
@@ -665,10 +665,8 @@ static int cpm_i2c_probe(struct platform_device *ofdev)
        cpm->adap.nr = (data && len == 4) ? be32_to_cpup(data) : -1;
        result = i2c_add_numbered_adapter(&cpm->adap);
 
-       if (result < 0) {
-               dev_err(&ofdev->dev, "Unable to register with I2C\n");
+       if (result < 0)
                goto out_shut;
-       }
 
        dev_dbg(&ofdev->dev, "hw routines for %s registered.\n",
                cpm->adap.name);
index 2d5ff86398d0911cd0c3a261fb689cf2c9e04609..9b36a7b3befda300bd9a6371f91a7253d173c501 100644 (file)
@@ -281,10 +281,8 @@ static int ec_i2c_probe(struct platform_device *pdev)
        bus->adap.retries = I2C_MAX_RETRIES;
 
        err = i2c_add_adapter(&bus->adap);
-       if (err) {
-               dev_err(dev, "cannot register i2c adapter\n");
+       if (err)
                return err;
-       }
        platform_set_drvdata(pdev, bus);
 
        return err;
index a8bdcb5292f5b30a925c40f28c8d193395b443c6..9e7ef5cf5d495d6de7fa8fad20449c4fa91aa5f8 100644 (file)
@@ -846,10 +846,8 @@ static int davinci_i2c_probe(struct platform_device *pdev)
 
        adap->nr = pdev->id;
        r = i2c_add_numbered_adapter(adap);
-       if (r) {
-               dev_err(&pdev->dev, "failure adding adapter\n");
+       if (r)
                goto err_unuse_clocks;
-       }
 
        return 0;
 
index b19a310bf9b3e822121cfcf48c1a01856fcabe67..f718ee4e3332fe3ced0cf3abff9c59b21f56b99b 100644 (file)
@@ -487,10 +487,8 @@ static int diolan_u2c_probe(struct usb_interface *interface,
 
        /* and finally attach to i2c layer */
        ret = i2c_add_adapter(&dev->adapter);
-       if (ret < 0) {
-               dev_err(&interface->dev, "failed to add I2C adapter\n");
+       if (ret < 0)
                goto error_free;
-       }
 
        dev_dbg(&interface->dev, "connected " DRIVER_NAME "\n");
 
index f2eb4f76591fbe5006c03eb3e61972d9d7f2d0e4..8acda2aa15583c327221d4f9a30f74566123aaee 100644 (file)
@@ -228,10 +228,8 @@ static int dln2_i2c_probe(struct platform_device *pdev)
 
        /* and finally attach to i2c layer */
        ret = i2c_add_adapter(&dln2->adapter);
-       if (ret < 0) {
-               dev_err(dev, "failed to add I2C adapter: %d\n", ret);
+       if (ret < 0)
                goto out_disable;
-       }
 
        return 0;
 
index e253598d764c0d1429e18982a3f8f4a2d32b77a4..aa336ba89aa3fe93ca07b224b851881ff98c9d92 100644 (file)
@@ -438,7 +438,6 @@ static int efm32_i2c_probe(struct platform_device *pdev)
 
        ret = i2c_add_adapter(&ddata->adapter);
        if (ret) {
-               dev_err(&pdev->dev, "failed to add i2c adapter (%d)\n", ret);
                free_irq(ddata->irq, ddata);
 
 err_disable_clk:
index c0e3ada028763d3e615c98f0998db8b169eb12be..bea607149972d4c3e7f412ff0cd28a1d0df9c6e7 100644 (file)
@@ -796,10 +796,8 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
        exynos5_i2c_reset(i2c);
 
        ret = i2c_add_adapter(&i2c->adap);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "failed to add bus to i2c core\n");
+       if (ret < 0)
                goto err_clk;
-       }
 
        platform_set_drvdata(pdev, i2c);
 
index 7c6966434ee7b9a2707da849e56128af41c0baf5..ae7f3180f7e88747aab4a92282a1b6b685ced405 100644 (file)
@@ -478,10 +478,8 @@ static int hix5hd2_i2c_probe(struct platform_device *pdev)
        pm_runtime_enable(priv->dev);
 
        ret = i2c_add_adapter(&priv->adap);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "failed to add bus to i2c core\n");
+       if (ret < 0)
                goto err_runtime;
-       }
 
        return ret;
 
index 5ef9b733d153fae8997ecf4058b3e82b31c4c95f..22a0ed4de80da0a8a06ab7634607ba0f026bdffa 100644 (file)
@@ -1613,7 +1613,6 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
                "SMBus I801 adapter at %04lx", priv->smba);
        err = i2c_add_adapter(&priv->adapter);
        if (err) {
-               dev_err(&dev->dev, "Failed to add SMBus adapter\n");
                i801_acpi_remove(priv);
                return err;
        }
index cdaa7be2cd1b940647df6d98b11edd8a2f7c67ef..412b91d255ad1d7e62ef6bb7d6b2518172c4d0e9 100644 (file)
@@ -751,10 +751,8 @@ static int iic_probe(struct platform_device *ofdev)
        adap->timeout = HZ;
 
        ret = i2c_add_adapter(adap);
-       if (ret  < 0) {
-               dev_err(&ofdev->dev, "failed to register i2c adapter\n");
+       if (ret  < 0)
                goto error_cleanup;
-       }
 
        dev_info(&ofdev->dev, "using %s mode\n",
                 dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");
index ea20425b6972179c037abb239ecde0b4b4f1994f..db8e8b40569d98aa2a4f107eddf574f0e5a31cd2 100644 (file)
@@ -1394,10 +1394,8 @@ static int img_i2c_probe(struct platform_device *pdev)
                goto disable_clk;
 
        ret = i2c_add_numbered_adapter(&i2c->adap);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "failed to add adapter\n");
+       if (ret < 0)
                goto disable_clk;
-       }
 
        return 0;
 
index 1844bc9f7cd5a229d3c9f169c5d3ef78429c60c1..cb11eee9567318593c94136260a4eb1eadb4e70d 100644 (file)
@@ -1129,10 +1129,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
 
        /* Add I2C adapter */
        ret = i2c_add_numbered_adapter(&i2c_imx->adapter);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "registration failed\n");
+       if (ret < 0)
                goto rpm_disable;
-       }
 
        pm_runtime_mark_last_busy(&pdev->dev);
        pm_runtime_put_autosuspend(&pdev->dev);
index c2f25f19d76f9bb4bd5832a4a6c8b72b80391dbb..0cf1379f4e8091b8627ed5bdf5c3dfe03a536630 100644 (file)
@@ -288,10 +288,8 @@ static int smbus_sch_probe(struct platform_device *dev)
                "SMBus SCH adapter at %04x", sch_smba);
 
        retval = i2c_add_adapter(&sch_adapter);
-       if (retval) {
-               dev_err(&dev->dev, "Couldn't register adapter!\n");
+       if (retval)
                sch_smba = 0;
-       }
 
        return retval;
 }
index 1c8707710098405ce485cf310d519bee20ff6966..f573448d2132161d4839a17d11afb1c1f4104188 100644 (file)
@@ -922,10 +922,8 @@ ismt_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                return err;
 
        err = i2c_add_adapter(&priv->adapter);
-       if (err) {
-               dev_err(&pdev->dev, "Failed to add SMBus iSMT adapter\n");
+       if (err)
                return -ENODEV;
-       }
        return 0;
 }
 
index cd9872594fe2a057b5c0b646c1b38ca56cc54814..b8ea62105f42c99205c1a241176ebb7210a55c08 100644 (file)
@@ -798,10 +798,8 @@ static int jz4780_i2c_probe(struct platform_device *pdev)
                goto err;
 
        ret = i2c_add_adapter(&i2c->adap);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "Failed to add bus\n");
+       if (ret < 0)
                goto err;
-       }
 
        return 0;
 
index 586a15205e61ded5757ef01e107d96a0a2915e01..9b1fef455a895d6174dd9f4b4775f75f5461ebe8 100644 (file)
@@ -432,10 +432,8 @@ static int i2c_lpc2k_probe(struct platform_device *pdev)
        i2c->adap.dev.of_node = pdev->dev.of_node;
 
        ret = i2c_add_adapter(&i2c->adap);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "failed to add adapter!\n");
+       if (ret < 0)
                goto fail_clk;
-       }
 
        dev_info(&pdev->dev, "LPC2K I2C adapter\n");
 
index 76e28980904f0b166971ffa09688f4302f067c5b..8570e6dbd0db2c0b5b7a3715bb75ac3fd80408a3 100644 (file)
@@ -453,7 +453,6 @@ static int meson_i2c_probe(struct platform_device *pdev)
 
        ret = i2c_add_adapter(&i2c->adap);
        if (ret < 0) {
-               dev_err(&pdev->dev, "can't register adapter\n");
                clk_unprepare(i2c->clk);
                return ret;
        }
index 48ecffecc0eda3fb42e63ff19a6e93d2f49ed918..565a49a0c564105e3cadf56bf3944e1b76ab505f 100644 (file)
@@ -737,10 +737,8 @@ static int fsl_i2c_probe(struct platform_device *op)
        i2c->adap.dev.of_node = of_node_get(op->dev.of_node);
 
        result = i2c_add_adapter(&i2c->adap);
-       if (result < 0) {
-               dev_err(i2c->dev, "failed to add adapter\n");
+       if (result < 0)
                goto fail_add;
-       }
 
        return result;
 
index d9373e60be8ae307336041581f3b8e10fcb0a0b3..4a7d9bc2142ba31db7579ed140cfbe6ed5224c02 100644 (file)
@@ -786,10 +786,8 @@ static int mtk_i2c_probe(struct platform_device *pdev)
 
        i2c_set_adapdata(&i2c->adap, i2c);
        ret = i2c_add_adapter(&i2c->adap);
-       if (ret) {
-               dev_err(&pdev->dev, "Failed to add i2c bus to i2c core\n");
+       if (ret)
                return ret;
-       }
 
        platform_set_drvdata(pdev, i2c);
 
index 033846cdf266227a767b24546c8eda54444f2d3c..5738556b6aac20cb45f7c3060aa634de379f5b8e 100644 (file)
@@ -868,7 +868,6 @@ static int mxs_i2c_probe(struct platform_device *pdev)
        i2c_set_adapdata(adap, i2c);
        err = i2c_add_numbered_adapter(adap);
        if (err) {
-               dev_err(dev, "Failed to add adapter (%d)\n", err);
                writel(MXS_I2C_CTRL0_SFTRST,
                                i2c->regs + MXS_I2C_CTRL0_SET);
                return err;
index 42fcc9458432f8abc2f25ededee424124551a784..374b35e7e450ce55ea97f7438864100c90f68b66 100644 (file)
@@ -366,7 +366,6 @@ static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg,
 
        error = i2c_add_adapter(&smbus->adapter);
        if (error) {
-               dev_err(&smbus->adapter.dev, "Failed to register adapter.\n");
                release_region(smbus->base, smbus->size);
                return error;
        }
index bcd17e8cbcb4b3cc8bb5b6aee7d4d6e2873df8b6..da6609d628487b161a531d37145e681c13500965 100644 (file)
@@ -1046,10 +1046,8 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)
                 adap->name, dev->virtbase);
 
        ret = i2c_add_adapter(adap);
-       if (ret) {
-               dev_err(&adev->dev, "failed to add adapter\n");
+       if (ret)
                goto err_no_adap;
-       }
 
        pm_runtime_put(&adev->dev);
 
index ac88a524143e07406bc2e4837a80a8ac17a4bd91..34f1889a407368e7bb14ecbfba3e86d28730c21d 100644 (file)
@@ -494,10 +494,8 @@ static int ocores_i2c_probe(struct platform_device *pdev)
 
        /* add i2c adapter to i2c tree */
        ret = i2c_add_adapter(&i2c->adap);
-       if (ret) {
-               dev_err(&pdev->dev, "Failed to add adapter\n");
+       if (ret)
                goto err_clk;
-       }
 
        /* add in known devices to the bus */
        if (pdata) {
index 30ae35146723a466afc20767d5f11853e040faf6..b75d2da79b27c5030440874b89d5627e1d617f10 100644 (file)
@@ -1213,10 +1213,8 @@ static int octeon_i2c_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, i2c);
 
        result = i2c_add_adapter(&i2c->adap);
-       if (result < 0) {
-               dev_err(i2c->dev, "failed to add adapter\n");
+       if (result < 0)
                goto out;
-       }
        dev_info(i2c->dev, "probed\n");
        return 0;
 
index ab1279b8e2407ae33353526788a0665bc03217b3..c7da0c42baeefa8689693a9b3d237ccaa7dd5db7 100644 (file)
@@ -1425,10 +1425,8 @@ omap_i2c_probe(struct platform_device *pdev)
        /* i2c device drivers may be active on return from add_adapter() */
        adap->nr = pdev->id;
        r = i2c_add_numbered_adapter(adap);
-       if (r) {
-               dev_err(omap->dev, "failure adding adapter\n");
+       if (r)
                goto err_unuse_clocks;
-       }
 
        dev_info(omap->dev, "bus %d rev%d.%d at %d kHz\n", adap->nr,
                 major, minor, omap->speed);
index 23d1c167b5d75204e98501a69398b2d826c53aa1..c2268cdf38e82348ae883c99d1f140a7fc2d0ecc 100644 (file)
@@ -694,7 +694,6 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
 
        retval = i2c_add_adapter(adap);
        if (retval) {
-               dev_err(&dev->dev, "Couldn't register adapter!\n");
                kfree(adapdata);
                kfree(adap);
                release_region(smba, SMBIOSIZE);
index 2c40edbf6224eb69a0cf720616b3ca8aee321502..217c78711d6501f71ed267df99256fd8b801ff78 100644 (file)
@@ -329,10 +329,8 @@ static int pmcmsptwi_probe(struct platform_device *pldev)
        i2c_set_adapdata(&pmcmsptwi_adapter, &pmcmsptwi_data);
 
        rc = i2c_add_adapter(&pmcmsptwi_adapter);
-       if (rc) {
-               dev_err(&pldev->dev, "Unable to register I2C adapter\n");
+       if (rc)
                goto ret_unmap;
-       }
 
        return 0;
 
index 7ea67aa46fb730d62342f8ec1a7be58369ca3122..fd5f9d2bf6d94eeaf1340e0ca260ffedcdcb135a 100644 (file)
@@ -714,10 +714,8 @@ static int i2c_pnx_probe(struct platform_device *pdev)
 
        /* Register this adapter with the I2C subsystem */
        ret = i2c_add_numbered_adapter(&alg_data->adapter);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "I2C: Failed to add bus\n");
+       if (ret < 0)
                goto out_clock;
-       }
 
        dev_dbg(&pdev->dev, "%s: Master at %#8x, irq %d.\n",
                alg_data->adapter.name, res->start, alg_data->irq);
index 82b6f02544dae7735d42eced79db679c1ce48ed9..0c8b1571886d5b7e1b8fb7bfedb25eb63d97cfec 100644 (file)
@@ -212,11 +212,8 @@ static int puv3_i2c_probe(struct platform_device *pdev)
 
        adapter->nr = pdev->id;
        rc = i2c_add_numbered_adapter(adapter);
-       if (rc) {
-               dev_err(&pdev->dev, "Adapter '%s' registration failed\n",
-                               adapter->name);
+       if (rc)
                goto fail_add_adapter;
-       }
 
        dev_info(&pdev->dev, "PKUnity v3 i2c bus adapter.\n");
        return 0;
index 0d351954db02b9d0c80a9a34d354e3805b9106d2..e28b825b0433783799319db31e8471320dd7fb82 100644 (file)
@@ -1292,10 +1292,8 @@ static int i2c_pxa_probe(struct platform_device *dev)
 #endif
 
        ret = i2c_add_numbered_adapter(&i2c->adap);
-       if (ret < 0) {
-               dev_err(&dev->dev, "failed to add bus: %d\n", ret);
+       if (ret < 0)
                goto ereqirq;
-       }
 
        platform_set_drvdata(dev, i2c);
 
index 52407f3c9e1cce3f9a4c0e9d010ad0dddb6eee7c..400e344704d2731da6e847210e7cbe984439ebe1 100644 (file)
@@ -875,10 +875,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, priv);
 
        ret = i2c_add_numbered_adapter(adap);
-       if (ret < 0) {
-               dev_err(dev, "reg adap failed: %d\n", ret);
+       if (ret < 0)
                goto out_pm_disable;
-       }
 
        dev_info(dev, "probed\n");
 
index d7e3af67154373c226f543b1a8b6e11803debee2..6263ea82d6ac3b10b97905647c1dc6034b78c100 100644 (file)
@@ -383,10 +383,8 @@ static int riic_i2c_probe(struct platform_device *pdev)
 
 
        ret = i2c_add_adapter(adap);
-       if (ret) {
-               dev_err(&pdev->dev, "failed to add adapter\n");
+       if (ret)
                return ret;
-       }
 
        platform_set_drvdata(pdev, riic);
 
index 2bc8b01153d61985814591a962851b19bb0bb2b1..3b87afe82f6394922ac6bff2a06d57d041128023 100644 (file)
@@ -1303,10 +1303,8 @@ static int rk3x_i2c_probe(struct platform_device *pdev)
        rk3x_i2c_adapt_div(i2c, clk_rate);
 
        ret = i2c_add_adapter(&i2c->adap);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "Could not register adapter\n");
+       if (ret < 0)
                goto err_clk_notifier;
-       }
 
        dev_info(&pdev->dev, "Initialized RK3xxx I2C bus at %p\n", i2c->regs);
 
index 38dc1cacfd8bba5d36da9e2638efb6a6ca93f455..499af26e736e7eb06aba01409faba3bbe0b20d59 100644 (file)
@@ -1215,7 +1215,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
 
        ret = i2c_add_numbered_adapter(&i2c->adap);
        if (ret < 0) {
-               dev_err(&pdev->dev, "failed to add bus to i2c core\n");
                pm_runtime_disable(&pdev->dev);
                s3c24xx_i2c_deregister_cpufreq(i2c);
                clk_unprepare(i2c->clk);
index 24968384b4014f92d69aded3f1928ecf733e933f..c2005c789d2b09b8429368599d93683c5342b364 100644 (file)
@@ -510,10 +510,8 @@ static int sh7760_i2c_probe(struct platform_device *pdev)
        }
 
        ret = i2c_add_numbered_adapter(&id->adap);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "reg adap failed: %d\n", ret);
+       if (ret < 0)
                goto out4;
-       }
 
        platform_set_drvdata(pdev, id);
 
index 6fb3e2645992297937635c0ffd0f791ed5c92b1e..50f276e8d17967f7ef124e138502e77e6181586e 100644 (file)
@@ -981,7 +981,6 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
        ret = i2c_add_numbered_adapter(adap);
        if (ret < 0) {
                sh_mobile_i2c_release_dma(pd);
-               dev_err(&dev->dev, "cannot add numbered adapter\n");
                return ret;
        }
 
index 792a42bdd335b90d829702ec994292c8b0a241ea..95e81d0f72b4d243aeb6fade9968549d10145e37 100644 (file)
@@ -387,10 +387,8 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev)
                writel(regval, siic->base + SIRFSOC_I2C_SDA_DELAY);
 
        err = i2c_add_numbered_adapter(adap);
-       if (err < 0) {
-               dev_err(&pdev->dev, "Can't add new i2c adapter\n");
+       if (err < 0)
                goto out;
-       }
 
        clk_disable(clk);
 
index 944ec4205084878cd951a3a2f72451ee6567d866..1371547ce1a3a811dae12cdea2bd0592ec4342f7 100644 (file)
@@ -874,10 +874,8 @@ static int st_i2c_probe(struct platform_device *pdev)
        init_completion(&i2c_dev->complete);
 
        ret = i2c_add_adapter(adap);
-       if (ret) {
-               dev_err(&pdev->dev, "Failed to add adapter\n");
+       if (ret)
                return ret;
-       }
 
        platform_set_drvdata(pdev, i2c_dev);
 
index 460c134832ac3039e9fd246f9263203b93453622..dc63236b45b21669922a77155bd2c244ec456dde 100644 (file)
@@ -920,11 +920,8 @@ static int stu300_probe(struct platform_device *pdev)
 
        /* i2c device drivers may be active on return from add_adapter() */
        ret = i2c_add_numbered_adapter(adap);
-       if (ret) {
-               dev_err(&pdev->dev, "failure adding ST Micro DDC "
-                      "I2C adapter\n");
+       if (ret)
                return ret;
-       }
 
        platform_set_drvdata(pdev, dev);
        dev_info(&pdev->dev, "ST DDC I2C @ %p, irq %d\n",
index b126dbaa47e37014acaf78ba528a6e177bffa9d8..d9979da11485ae0bf3d44aca6db9f435afe64b92 100644 (file)
@@ -932,10 +932,8 @@ static int tegra_i2c_probe(struct platform_device *pdev)
        i2c_dev->adapter.dev.of_node = pdev->dev.of_node;
 
        ret = i2c_add_numbered_adapter(&i2c_dev->adapter);
-       if (ret) {
-               dev_err(&pdev->dev, "Failed to add I2C adapter\n");
+       if (ret)
                goto disable_div_clk;
-       }
 
        return 0;
 
index e1e3a85596c56285cd9ec89bf03e255ec69784d3..fbd0fd59f31239d83299b1949da95b0952f06379 100644 (file)
@@ -432,10 +432,8 @@ static int wmt_i2c_probe(struct platform_device *pdev)
        }
 
        err = i2c_add_adapter(adap);
-       if (err) {
-               dev_err(&pdev->dev, "failed to add adapter\n");
+       if (err)
                return err;
-       }
 
        platform_set_drvdata(pdev, i2c_dev);
 
index 4233f5695352fdc951c54c54dc6fbb9de926d26e..263685c7a5128773f12dfc00bd4ba75324aeee4c 100644 (file)
@@ -418,7 +418,6 @@ static int xgene_slimpro_i2c_probe(struct platform_device *pdev)
        i2c_set_adapdata(adapter, ctx);
        rc = i2c_add_adapter(adapter);
        if (rc) {
-               dev_err(&pdev->dev, "Adapter registeration failed\n");
                mbox_free_channel(ctx->mbox_chan);
                return rc;
        }
index 74f54f2f471fa7d311783ab1e34069e28d98e70d..66bce3b311a1998a1a446ff7012d50ead27fd987 100644 (file)
@@ -804,7 +804,6 @@ static int xiic_i2c_probe(struct platform_device *pdev)
        /* add i2c adapter to i2c tree */
        ret = i2c_add_adapter(&i2c->adap);
        if (ret) {
-               dev_err(&pdev->dev, "Failed to add adapter\n");
                xiic_deinit(i2c);
                goto err_clk_dis;
        }
index 55a7bef1b2e1df643d5dac119678119b5134ddd0..2a972ed7aa0df113185b9fb567e76d11638739e4 100644 (file)
@@ -400,10 +400,8 @@ static int xlp9xx_i2c_probe(struct platform_device *pdev)
        i2c_set_adapdata(&priv->adapter, priv);
 
        err = i2c_add_adapter(&priv->adapter);
-       if (err) {
-               dev_err(&pdev->dev, "failed to add I2C adapter!\n");
+       if (err)
                return err;
-       }
 
        platform_set_drvdata(pdev, priv);
        dev_dbg(&pdev->dev, "I2C bus:%d added\n", priv->adapter.nr);
index 613c3a4f2c51426453397f73db5ef72c7a02eac7..0968f59b6df58690207b182b4fe192d5422e349b 100644 (file)
@@ -432,10 +432,8 @@ static int xlr_i2c_probe(struct platform_device *pdev)
 
        i2c_set_adapdata(&priv->adap, priv);
        ret = i2c_add_numbered_adapter(&priv->adap);
-       if (ret < 0) {
-               dev_err(&priv->adap.dev, "Failed to add i2c bus.\n");
+       if (ret < 0)
                return ret;
-       }
 
        platform_set_drvdata(pdev, priv);
        dev_info(&priv->adap.dev, "Added I2C Bus.\n");