diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2020-08-12 09:19:28 +0200 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2020-09-22 17:49:50 +0200 |
commit | bd4ef3729213280522694ff714e28192e486487d (patch) | |
tree | 89c75c5f4a88b9e0bdf564651e732a0773cbf42c /drivers/misc/habanalabs/common/command_submission.c | |
parent | habanalabs: cast int to u32 before printing it with %u (diff) | |
download | linux-bd4ef3729213280522694ff714e28192e486487d.tar.xz linux-bd4ef3729213280522694ff714e28192e486487d.zip |
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/habanalabs/common/command_submission.c')
-rw-r--r-- | drivers/misc/habanalabs/common/command_submission.c | 4 |
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; |