summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2020-08-12 10:19:28 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2020-09-22 18:49:50 +0300
commitbd4ef3729213280522694ff714e28192e486487d (patch)
tree89c75c5f4a88b9e0bdf564651e732a0773cbf42c /drivers/misc
parentf907af183b8bf35393e3057204000c16d8cb9bbe (diff)
downloadlinux-bd4ef3729213280522694ff714e28192e486487d.tar.bz2
habanalabs: eliminate redundant else condition
If both parts of if-else are goto statements, we can remove the else and put the else goto statement after the if statement. Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Tomer Tayar <ttayar@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/habanalabs/common/command_submission.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c
index 00c1ff2e953d..a811a9fdf13b 100644
--- a/drivers/misc/habanalabs/common/command_submission.c
+++ b/drivers/misc/habanalabs/common/command_submission.c
@@ -686,8 +686,8 @@ static int cs_ioctl_default(struct hl_fpriv *hpriv, void __user *chunks,
rc = -ENOMEM;
if (is_kernel_allocated_cb)
goto release_cb;
- else
- goto free_cs_object;
+
+ goto free_cs_object;
}
job->id = i + 1;