fsl/fman: fix return value checking
authorMadalin Bucur <madalin.bucur@nxp.com>
Tue, 12 Jul 2016 15:08:52 +0000 (18:08 +0300)
committerMadalin Bucur <madalin.bucur@nxp.com>
Tue, 4 Oct 2016 06:26:10 +0000 (09:26 +0300)
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
drivers/net/ethernet/freescale/fman/fman.c

index 1fc10493a6b1e325915792b3d5ee44a6eb1134ec..dafd9e1baba2cb420ea70826408d0474488ca246 100644 (file)
@@ -618,7 +618,7 @@ struct fman {
        unsigned long cam_offset;
        size_t cam_size;
        /* Fifo in MURAM */
-       int fifo_offset;
+       unsigned long fifo_offset;
        size_t fifo_size;
 
        u32 liodn_base[64];
@@ -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__);