All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: imx: fix inconsistent IS_ERR and PTR_ERR
@ 2019-01-23  0:37 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-23  0:37 UTC (permalink / raw
  To: Oleksij Rempel, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team
  Cc: linux-i2c, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva

Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request.

The proper pointer to be passed as argument is dma->chan_tx.

This bug was detected with the help of Coccinelle.

Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/i2c/busses/i2c-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 09b124547669..42fed40198a0 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -287,7 +287,7 @@ static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
 
 	dma->chan_tx = dma_request_chan(dev, "tx");
 	if (IS_ERR(dma->chan_tx)) {
-		ret = PTR_ERR(dma->chan_rx);
+		ret = PTR_ERR(dma->chan_tx);
 		if (ret != -ENODEV && ret != -EPROBE_DEFER)
 			dev_err(dev, "can't request DMA tx channel (%d)\n", ret);
 		goto fail_al;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] i2c: imx: fix inconsistent IS_ERR and PTR_ERR
@ 2019-01-23  0:37 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-23  0:37 UTC (permalink / raw
  To: Oleksij Rempel, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team
  Cc: Gustavo A. R. Silva, linux-i2c, linux-arm-kernel, linux-kernel

Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request.

The proper pointer to be passed as argument is dma->chan_tx.

This bug was detected with the help of Coccinelle.

Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/i2c/busses/i2c-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 09b124547669..42fed40198a0 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -287,7 +287,7 @@ static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
 
 	dma->chan_tx = dma_request_chan(dev, "tx");
 	if (IS_ERR(dma->chan_tx)) {
-		ret = PTR_ERR(dma->chan_rx);
+		ret = PTR_ERR(dma->chan_tx);
 		if (ret != -ENODEV && ret != -EPROBE_DEFER)
 			dev_err(dev, "can't request DMA tx channel (%d)\n", ret);
 		goto fail_al;
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] i2c: imx: fix inconsistent IS_ERR and PTR_ERR
@ 2019-01-23  0:37 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-23  0:37 UTC (permalink / raw
  To: Oleksij Rempel, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team
  Cc: Gustavo A. R. Silva, linux-i2c, linux-arm-kernel, linux-kernel

Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request.

The proper pointer to be passed as argument is dma->chan_tx.

This bug was detected with the help of Coccinelle.

Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/i2c/busses/i2c-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 09b124547669..42fed40198a0 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -287,7 +287,7 @@ static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
 
 	dma->chan_tx = dma_request_chan(dev, "tx");
 	if (IS_ERR(dma->chan_tx)) {
-		ret = PTR_ERR(dma->chan_rx);
+		ret = PTR_ERR(dma->chan_tx);
 		if (ret != -ENODEV && ret != -EPROBE_DEFER)
 			dev_err(dev, "can't request DMA tx channel (%d)\n", ret);
 		goto fail_al;
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] i2c: imx: fix inconsistent IS_ERR and PTR_ERR
  2019-01-23  0:37 ` Gustavo A. R. Silva
@ 2019-01-23  8:28   ` Wolfram Sang
  -1 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2019-01-23  8:28 UTC (permalink / raw
  To: Gustavo A. R. Silva
  Cc: Oleksij Rempel, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-i2c, linux-arm-kernel,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

On Tue, Jan 22, 2019 at 06:37:41PM -0600, Gustavo A. R. Silva wrote:
> Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request.
> 
> The proper pointer to be passed as argument is dma->chan_tx.
> 
> This bug was detected with the help of Coccinelle.
> 
> Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

I pushed a similar fix to linux-next yesterday.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] i2c: imx: fix inconsistent IS_ERR and PTR_ERR
@ 2019-01-23  8:28   ` Wolfram Sang
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2019-01-23  8:28 UTC (permalink / raw
  To: Gustavo A. R. Silva
  Cc: Sascha Hauer, linux-kernel, Oleksij Rempel, NXP Linux Team,
	Pengutronix Kernel Team, Fabio Estevam, Shawn Guo,
	linux-arm-kernel, linux-i2c


[-- Attachment #1.1: Type: text/plain, Size: 468 bytes --]

On Tue, Jan 22, 2019 at 06:37:41PM -0600, Gustavo A. R. Silva wrote:
> Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request.
> 
> The proper pointer to be passed as argument is dma->chan_tx.
> 
> This bug was detected with the help of Coccinelle.
> 
> Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

I pushed a similar fix to linux-next yesterday.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] i2c: imx: fix inconsistent IS_ERR and PTR_ERR
  2019-01-23  8:28   ` Wolfram Sang
@ 2019-01-23  8:55     ` Gustavo A. R. Silva
  -1 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-23  8:55 UTC (permalink / raw
  To: Wolfram Sang
  Cc: Oleksij Rempel, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-i2c, linux-arm-kernel,
	linux-kernel



On 1/23/19 2:28 AM, Wolfram Sang wrote:
> On Tue, Jan 22, 2019 at 06:37:41PM -0600, Gustavo A. R. Silva wrote:
>> Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request.
>>
>> The proper pointer to be passed as argument is dma->chan_tx.
>>
>> This bug was detected with the help of Coccinelle.
>>
>> Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> 
> I pushed a similar fix to linux-next yesterday.
> 

Great. Good to know it is fixed now. :)

Thanks
--
Gustavo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] i2c: imx: fix inconsistent IS_ERR and PTR_ERR
@ 2019-01-23  8:55     ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-23  8:55 UTC (permalink / raw
  To: Wolfram Sang
  Cc: Sascha Hauer, linux-kernel, Oleksij Rempel, NXP Linux Team,
	Pengutronix Kernel Team, Fabio Estevam, Shawn Guo,
	linux-arm-kernel, linux-i2c



On 1/23/19 2:28 AM, Wolfram Sang wrote:
> On Tue, Jan 22, 2019 at 06:37:41PM -0600, Gustavo A. R. Silva wrote:
>> Fix inconsistent IS_ERR and PTR_ERR in i2c_imx_dma_request.
>>
>> The proper pointer to be passed as argument is dma->chan_tx.
>>
>> This bug was detected with the help of Coccinelle.
>>
>> Fixes: 5b3a23a3cc94 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> 
> I pushed a similar fix to linux-next yesterday.
> 

Great. Good to know it is fixed now. :)

Thanks
--
Gustavo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-01-23  8:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-23  0:37 [PATCH] i2c: imx: fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2019-01-23  0:37 ` Gustavo A. R. Silva
2019-01-23  0:37 ` Gustavo A. R. Silva
2019-01-23  8:28 ` Wolfram Sang
2019-01-23  8:28   ` Wolfram Sang
2019-01-23  8:55   ` Gustavo A. R. Silva
2019-01-23  8:55     ` Gustavo A. R. Silva

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.