Skip to content

Commit

Permalink
i2c: i801: Drop duplicate NULL check in i801_del_mux()
Browse files Browse the repository at this point in the history
Since gpiod_remove_lookup_table() is NULL-aware, no need to have this check
in the caller. Drop duplicate NULL check.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Andy Shevchenko authored and Wolfram Sang committed Jan 5, 2021
1 parent d321ad1 commit 926e6b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/i2c/busses/i2c-i801.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,8 +1487,7 @@ static void i801_del_mux(struct i801_priv *priv)
{
if (priv->mux_pdev)
platform_device_unregister(priv->mux_pdev);
if (priv->lookup)
gpiod_remove_lookup_table(priv->lookup);
gpiod_remove_lookup_table(priv->lookup);
}

static unsigned int i801_get_adapter_class(struct i801_priv *priv)
Expand Down

0 comments on commit 926e6b2

Please sign in to comment.