drm/exynos: remove superfluous checks in g2d_check_reg_offset()
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Mon, 17 Aug 2015 22:51:23 +0000 (00:51 +0200)
committerInki Dae <daeinki@gmail.com>
Wed, 2 Sep 2015 14:10:29 +0000 (23:10 +0900)
The cases of the switch statement ensure that reg_type
can never be REG_TYPE_NONE here.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_g2d.c

index 85457b33d881b772731d0b28dfcef9498d791814..535b4ad6c4b14783a6ce099f81f4775759bd5ee6 100644 (file)
@@ -994,8 +994,6 @@ static int g2d_check_reg_offset(struct device *dev,
                                goto err;
 
                        reg_type = g2d_get_reg_type(reg_offset);
-                       if (reg_type == REG_TYPE_NONE)
-                               goto err;
 
                        /* check userptr buffer type. */
                        if ((cmdlist->data[index] & ~0x7fffffff) >> 31) {
@@ -1020,8 +1018,6 @@ static int g2d_check_reg_offset(struct device *dev,
                                goto err;
 
                        reg_type = g2d_get_reg_type(reg_offset);
-                       if (reg_type == REG_TYPE_NONE)
-                               goto err;
 
                        buf_desc = &buf_info->descs[reg_type];
                        value = cmdlist->data[index + 1];
@@ -1034,8 +1030,6 @@ static int g2d_check_reg_offset(struct device *dev,
                                goto err;
 
                        reg_type = g2d_get_reg_type(reg_offset);
-                       if (reg_type == REG_TYPE_NONE)
-                               goto err;
 
                        buf_desc = &buf_info->descs[reg_type];
                        value = cmdlist->data[index + 1];
@@ -1049,8 +1043,6 @@ static int g2d_check_reg_offset(struct device *dev,
                                goto err;
 
                        reg_type = g2d_get_reg_type(reg_offset);
-                       if (reg_type == REG_TYPE_NONE)
-                               goto err;
 
                        buf_desc = &buf_info->descs[reg_type];
                        value = cmdlist->data[index + 1];