Commit 7de5c36c authored by Tobias Jakobi's avatar Tobias Jakobi Committed by Inki Dae

drm/exynos: remove superfluous checks in g2d_check_reg_offset()

The cases of the switch statement ensure that reg_type
can never be REG_TYPE_NONE here.
Signed-off-by: default avatarTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 179239a7
...@@ -994,8 +994,6 @@ static int g2d_check_reg_offset(struct device *dev, ...@@ -994,8 +994,6 @@ static int g2d_check_reg_offset(struct device *dev,
goto err; goto err;
reg_type = g2d_get_reg_type(reg_offset); reg_type = g2d_get_reg_type(reg_offset);
if (reg_type == REG_TYPE_NONE)
goto err;
/* check userptr buffer type. */ /* check userptr buffer type. */
if ((cmdlist->data[index] & ~0x7fffffff) >> 31) { if ((cmdlist->data[index] & ~0x7fffffff) >> 31) {
...@@ -1020,8 +1018,6 @@ static int g2d_check_reg_offset(struct device *dev, ...@@ -1020,8 +1018,6 @@ static int g2d_check_reg_offset(struct device *dev,
goto err; goto err;
reg_type = g2d_get_reg_type(reg_offset); reg_type = g2d_get_reg_type(reg_offset);
if (reg_type == REG_TYPE_NONE)
goto err;
buf_desc = &buf_info->descs[reg_type]; buf_desc = &buf_info->descs[reg_type];
value = cmdlist->data[index + 1]; value = cmdlist->data[index + 1];
...@@ -1034,8 +1030,6 @@ static int g2d_check_reg_offset(struct device *dev, ...@@ -1034,8 +1030,6 @@ static int g2d_check_reg_offset(struct device *dev,
goto err; goto err;
reg_type = g2d_get_reg_type(reg_offset); reg_type = g2d_get_reg_type(reg_offset);
if (reg_type == REG_TYPE_NONE)
goto err;
buf_desc = &buf_info->descs[reg_type]; buf_desc = &buf_info->descs[reg_type];
value = cmdlist->data[index + 1]; value = cmdlist->data[index + 1];
...@@ -1049,8 +1043,6 @@ static int g2d_check_reg_offset(struct device *dev, ...@@ -1049,8 +1043,6 @@ static int g2d_check_reg_offset(struct device *dev,
goto err; goto err;
reg_type = g2d_get_reg_type(reg_offset); reg_type = g2d_get_reg_type(reg_offset);
if (reg_type == REG_TYPE_NONE)
goto err;
buf_desc = &buf_info->descs[reg_type]; buf_desc = &buf_info->descs[reg_type];
value = cmdlist->data[index + 1]; value = cmdlist->data[index + 1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment