ath79: fix missing return statement in ar934x_nand
authorDavid Bauer <mail@david-bauer.net>
Sun, 22 Mar 2020 19:06:23 +0000 (20:06 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sun, 22 Mar 2020 19:09:44 +0000 (20:09 +0100)
The reset assert and deassert methods currently miss
a return value, leading to a compilation warning.

Return the return-value of reset_control_assert and
reset_control_deassert to fix these warnings.

Suggested-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Signed-off-by: David Bauer <mail@david-bauer.net>
target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c

index 70aa396e25b05a11e549a2cc166c670864398320..63abc4a8d8b04c3e611f882eabdffaf6c9f727a9 100644 (file)
@@ -1082,14 +1082,22 @@ static int ar934x_nfc_write_page(struct nand_chip *chip,
        return err;
 }
 
-static int ar934x_nfc_hw_reset_assert(struct ar934x_nfc *nfc) {
-       reset_control_assert(nfc->rst);
+static int ar934x_nfc_hw_reset_assert(struct ar934x_nfc *nfc)
+{
+       int err;
+
+       err = reset_control_assert(nfc->rst);
        udelay(250);
+       return err;
 }
 
-static int ar934x_nfc_hw_reset_deassert(struct ar934x_nfc *nfc) {
-       reset_control_deassert(nfc->rst);
+static int ar934x_nfc_hw_reset_deassert(struct ar934x_nfc *nfc)
+{
+       int err;
+
+       err = reset_control_deassert(nfc->rst);
        udelay(250);
+       return err;
 }
 
 static int ar934x_nfc_hw_init(struct ar934x_nfc *nfc)