2013-03-14 09:08:18

by Alexandru Gheorghiu

[permalink] [raw]
Subject: [PATCH] drivers: spi: Use PTR_RET function

Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <[email protected]>
---
drivers/spi/spi-fsl-spi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index 086a9ee..1985ba3 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -1134,9 +1134,7 @@ static int plat_mpc8xxx_spi_probe(struct platform_device *pdev)
return -EINVAL;

master = fsl_spi_probe(&pdev->dev, mem, irq);
- if (IS_ERR(master))
- return PTR_ERR(master);
- return 0;
+ return PTR_RET(master);
}

static int plat_mpc8xxx_spi_remove(struct platform_device *pdev)
--
1.7.9.5


2013-04-01 13:33:15

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] drivers: spi: Use PTR_RET function

On Thu, Mar 14, 2013 at 11:07:31AM +0200, Alexandru Gheorghiu wrote:
> Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
> Patch found using coccinelle.

Applied, but please always use subject lines appropraite for the
subsystem.


Attachments:
(No filename) (240.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments