[PATCH -next] clk: exynos-audss: remove redundant dev_err call in exynos_audss_clk_probe()

2014-01-13 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 drivers/clk/samsung/clk-exynos-audss.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos-audss.c 
b/drivers/clk/samsung/clk-exynos-audss.c
index 884187f..01ef381 100644
--- a/drivers/clk/samsung/clk-exynos-audss.c
+++ b/drivers/clk/samsung/clk-exynos-audss.c
@@ -94,10 +94,8 @@ static int exynos_audss_clk_probe(struct platform_device 
*pdev)
 
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
reg_base = devm_ioremap_resource(pdev-dev, res);
-   if (IS_ERR(reg_base)) {
-   dev_err(pdev-dev, failed to map audss registers\n);
+   if (IS_ERR(reg_base))
return PTR_ERR(reg_base);
-   }
 
clk_table = devm_kzalloc(pdev-dev,
sizeof(struct clk *) * EXYNOS_AUDSS_MAX_CLKS,

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH -next] spi: spi-s3c24xx: remove redundant return value check of platform_get_resource()

2013-12-19 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 drivers/spi/spi-s3c24xx.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index ebf80bb..2ccb28d 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -560,14 +560,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
dev_dbg(hw-dev, bitbang at %p\n, hw-bitbang);
 
/* find and map our resources */
-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   if (res == NULL) {
-   dev_err(pdev-dev, Cannot get IORESOURCE_MEM\n);
-   err = -ENOENT;
-   goto err_no_pdata;
-   }
-
hw-regs = devm_ioremap_resource(pdev-dev, res);
if (IS_ERR(hw-regs)) {
err = PTR_ERR(hw-regs);

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] spi: s3c64xx: fix reference leak to master in s3c64xx_spi_remove()

2013-11-14 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

Once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory, otherwise we will
leak a reference to master. Fix by removing the unnecessary
spi_master_get() call.

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 drivers/spi/spi-s3c64xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 9e2020d..9c82d7b 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1439,7 +1439,7 @@ err0:
 
 static int s3c64xx_spi_remove(struct platform_device *pdev)
 {
-   struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
+   struct spi_master *master = platform_get_drvdata(pdev);
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
 
pm_runtime_disable(pdev-dev);

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ASoC: Samsung: I2S: fix return value check in i2s_alloc_dai()

2013-10-25 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

In case of error, the function platform_device_alloc() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 sound/soc/samsung/i2s.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index b302f3b..b721443 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1073,7 +1073,7 @@ static struct i2s_dai *i2s_alloc_dai(struct 
platform_device *pdev, bool sec)
dev_set_drvdata(i2s-pdev-dev, i2s);
} else {/* Create a new platform_device for Secondary */
i2s-pdev = platform_device_alloc(samsung-i2s-sec, -1);
-   if (IS_ERR(i2s-pdev))
+   if (!i2s-pdev)
return NULL;
 
i2s-pdev-dev.parent = pdev-dev;

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe()

2013-09-28 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

Add the missing clk_disable_unprepare() before return
from exynos_pcie_probe() in the error handling case.

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 drivers/pci/host/pci-exynos.c | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c
index 94e096b..e25598a 100644
--- a/drivers/pci/host/pci-exynos.c
+++ b/drivers/pci/host/pci-exynos.c
@@ -487,18 +487,24 @@ static int __init exynos_pcie_probe(struct 
platform_device *pdev)
 
elbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
exynos_pcie-elbi_base = devm_ioremap_resource(pdev-dev, elbi_base);
-   if (IS_ERR(exynos_pcie-elbi_base))
-   return PTR_ERR(exynos_pcie-elbi_base);
+   if (IS_ERR(exynos_pcie-elbi_base)) {
+   ret = PTR_ERR(exynos_pcie-elbi_base);
+   goto fail_bus_clk;
+   }
 
phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1);
exynos_pcie-phy_base = devm_ioremap_resource(pdev-dev, phy_base);
-   if (IS_ERR(exynos_pcie-phy_base))
-   return PTR_ERR(exynos_pcie-phy_base);
+   if (IS_ERR(exynos_pcie-phy_base)) {
+   ret = PTR_ERR(exynos_pcie-phy_base);
+   goto fail_bus_clk;
+   }
 
block_base = platform_get_resource(pdev, IORESOURCE_MEM, 2);
exynos_pcie-block_base = devm_ioremap_resource(pdev-dev, block_base);
-   if (IS_ERR(exynos_pcie-block_base))
-   return PTR_ERR(exynos_pcie-block_base);
+   if (IS_ERR(exynos_pcie-block_base)) {
+   ret = PTR_ERR(exynos_pcie-block_base);
+   goto fail_bus_clk;
+   }
 
ret = add_pcie_port(pp, pdev);
if (ret  0)

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drm/exynos: fix return value check in lowlevel_buffer_allocate()

2013-09-10 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

In case of error, the function drm_prime_pages_to_sg() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 drivers/gpu/drm/exynos/exynos_drm_buf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.c 
b/drivers/gpu/drm/exynos/exynos_drm_buf.c
index 3445a0f..e3ee833 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_buf.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_buf.c
@@ -90,9 +90,9 @@ static int lowlevel_buffer_allocate(struct drm_device *dev,
}
 
buf-sgt = drm_prime_pages_to_sg(buf-pages, nr_pages);
-   if (!buf-sgt) {
+   if (IS_ERR(buf-sgt)) {
DRM_ERROR(failed to get sg table.\n);
-   ret = -ENOMEM;
+   ret = PTR_ERR(buf-sgt);
goto err_free_attrs;
}
 

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drm/exynos: exynos_drm_ipp: fix return value check

2013-07-04 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

In case of error, the function ipp_find_obj() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 drivers/gpu/drm/exynos/exynos_drm_ipp.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c 
b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index b1ef8e7..0eb8538 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -342,10 +342,10 @@ int exynos_drm_ipp_get_property(struct drm_device 
*drm_dev, void *data,
 */
ippdrv = ipp_find_obj(ctx-ipp_idr, ctx-ipp_lock,
prop_list-ipp_id);
-   if (!ippdrv) {
+   if (IS_ERR(ippdrv)) {
DRM_ERROR(not found ipp%d driver.\n,
prop_list-ipp_id);
-   return -EINVAL;
+   return PTR_ERR(ippdrv);
}
 
prop_list = ippdrv-prop_list;
@@ -970,9 +970,9 @@ int exynos_drm_ipp_queue_buf(struct drm_device *drm_dev, 
void *data,
/* find command node */
c_node = ipp_find_obj(ctx-prop_idr, ctx-prop_lock,
qbuf-prop_id);
-   if (!c_node) {
+   if (IS_ERR(c_node)) {
DRM_ERROR(failed to get command node.\n);
-   return -EFAULT;
+   return PTR_ERR(c_node);
}
 
/* buffer control */
@@ -1106,9 +1106,9 @@ int exynos_drm_ipp_cmd_ctrl(struct drm_device *drm_dev, 
void *data,
 
c_node = ipp_find_obj(ctx-prop_idr, ctx-prop_lock,
cmd_ctrl-prop_id);
-   if (!c_node) {
+   if (IS_ERR(c_node)) {
DRM_ERROR(invalid command node list.\n);
-   return -EINVAL;
+   return PTR_ERR(c_node);
}
 
if (!exynos_drm_ipp_check_valid(ippdrv-dev, cmd_ctrl-ctrl,

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] usb: gadget: s3c2410_udc: fix error return code in s3c2410_udc_probe()

2013-05-07 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

Fix to return a negative error code in the gpio_to_irq() error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 drivers/usb/gadget/s3c2410_udc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index d0e75e1..c974776 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -1851,6 +1851,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
irq = gpio_to_irq(udc_info-vbus_pin);
if (irq  0) {
dev_err(dev, no irq for gpio vbus pin\n);
+   retval = irq;
goto err_gpio_claim;
}
 

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH -next] ARM: EXYNOS: remove duplicated include from common.c

2013-03-11 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

Remove duplicated include.

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 arch/arm/mach-exynos/common.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index d63d399..01e4089 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -23,7 +23,6 @@
 #include linux/of_irq.h
 #include linux/export.h
 #include linux/irqdomain.h
-#include linux/irqchip.h
 #include linux/of_address.h
 #include linux/irqchip/arm-gic.h
 

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH -next] ARM: EXYNOS: remove duplicated include from mach-exynos5-dt.c

2012-12-04 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

Remove duplicated include.

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 arch/arm/mach-exynos/mach-exynos5-dt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c 
b/arch/arm/mach-exynos/mach-exynos5-dt.c
index 45988fd..087f2df 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -14,7 +14,6 @@
 #include linux/serial_core.h
 #include linux/io.h
 #include linux/memblock.h
-#include linux/of_fdt.h
 
 #include asm/mach/arch.h
 #include asm/hardware/gic.h

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html