[PATCH] tpm:tpm_i2c_nuvoton: simpyl return statements

From: Peter Huewe
Date: Tue Dec 02 2014 - 18:18:52 EST


if !rc evals to false it is 0
-> we can return rc in both cases

Signed-off-by: Peter Huewe <peterhuewe@xxxxxx>
---
drivers/char/tpm/tpm_i2c_nuvoton.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2c_nuvoton.c
index 14246e2..79f4fef 100644
--- a/drivers/char/tpm/tpm_i2c_nuvoton.c
+++ b/drivers/char/tpm/tpm_i2c_nuvoton.c
@@ -605,10 +605,8 @@ static int i2c_nuvoton_probe(struct i2c_client *client,
return -ENODEV;

rc = tpm_chip_register(chip);
- if (rc)
- return rc;

- return 0;
+ return rc;
}

static int i2c_nuvoton_remove(struct i2c_client *client)
--
2.0.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/