---
title: "redundant-error-return-check"
description: "Simplify redundant error checks before returning."
image: "https://strider.gempir.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://strider.gempir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# redundant-error-return-check

<!-- Code generated by docs/scripts/generate-check-docs.go; DO NOT EDIT. -->

**Default severity:** `warning`

Simplify redundant error checks before returning.

## Bad

```go
if err := save(); err != nil { return err }
return nil
```

## Good

```go
err := save()
return err
```

Source: https://strider.gempir.com/lints/redundant-error-return-check/index.mdx
