fsl/fman: fix error handling
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Mon, 4 Jul 2016 05:46:42 +0000 (07:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2016 00:15:52 +0000 (17:15 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fman/fman.c

index 1de2e1e51c2be6c2259f8d6dca61b92a1338597e..f634e769038e4db640c2986429056ecea1095fa9 100644 (file)
@@ -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__);