There is no reason to explicitly call devm_kfree
in probe or remove functions.

Signed-off-by: Emil Goode <emilgo...@gmail.com>
---
 drivers/tty/serial/max310x.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 06ff5ad..2bc28a5 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1198,7 +1198,6 @@ err_freq:
 
 err_out:
        dev_set_drvdata(dev, NULL);
-       devm_kfree(dev, s);
 
        return ret;
 }
@@ -1234,8 +1233,6 @@ static int __devexit max310x_remove(struct spi_device 
*spi)
        if (s->pdata->exit)
                s->pdata->exit();
 
-       devm_kfree(dev, s);
-
        return ret;
 }
 
-- 
1.7.10.4

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

Reply via email to