* [PATCH] fsl/fman: fix error handling
@ 2016-07-04 5:46 Christophe JAILLET
2016-07-05 0:18 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2016-07-04 5:46 UTC (permalink / raw)
To: davem, igal.liberman, rdunlap, standby24x7, arnd
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
This is likely that checking 'fman->fifo_offset' instead of
'fman->cam_offset' is expected here.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
The type of 'fifo_offset' may also need to be changed.
---
drivers/net/ethernet/freescale/fman/fman.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c
index 1de2e1e..f634e769 100644
--- a/drivers/net/ethernet/freescale/fman/fman.c
+++ b/drivers/net/ethernet/freescale/fman/fman.c
@@ -2036,7 +2036,7 @@ static int fman_init(struct fman *fman)
/* allocate MURAM for FIFO according to total size */
fman->fifo_offset = fman_muram_alloc(fman->muram,
fman->state->total_fifo_size);
- if (IS_ERR_VALUE(fman->cam_offset)) {
+ if (IS_ERR_VALUE(fman->fifo_offset)) {
free_init_resources(fman);
dev_err(fman->dev, "%s: MURAM alloc for BMI FIFO failed\n",
__func__);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fsl/fman: fix error handling
2016-07-04 5:46 [PATCH] fsl/fman: fix error handling Christophe JAILLET
@ 2016-07-05 0:18 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-07-05 0:18 UTC (permalink / raw)
To: christophe.jaillet
Cc: igal.liberman, rdunlap, standby24x7, arnd, netdev, linux-kernel,
kernel-janitors
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Mon, 4 Jul 2016 07:46:42 +0200
> This is likely that checking 'fman->fifo_offset' instead of
> 'fman->cam_offset' is expected here.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>
> The type of 'fifo_offset' may also need to be changed.
Fix the test rather than trying to force it into the error pointer
macro.
If fifo_offset is not a pointer, then change the test to check for
whatever would be appropriate for values returned from
fman_muram_alloc().
This is a very low quality patch submission, you submitted a "fix"
which added a new build warning and made it obvious that something
else is needed as well here. You even stated that you realized this.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-05 0:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-04 5:46 [PATCH] fsl/fman: fix error handling Christophe JAILLET
2016-07-05 0:18 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).