ARM: qcom: silence an uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Apr 2016 06:45:11 +0000 (09:45 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 May 2016 21:20:04 +0000 (14:20 -0700)
It's harmless but, if "enable" isn't set, then we pass uninitialized
values to qcom_coincell_chgr_config().  The values aren't used, but
let's silence the warning anyway.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tim Bird <tim.bird@sonymobile.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/qcom-coincell.c

index 7b4a2da487a556f263e4d3d8b1d902d649c6961b..829a61dbd65f1d78015246c92f2a1554cb7cb8b3 100644 (file)
@@ -94,7 +94,8 @@ static int qcom_coincell_probe(struct platform_device *pdev)
 {
        struct device_node *node = pdev->dev.of_node;
        struct qcom_coincell chgr;
-       u32 rset, vset;
+       u32 rset = 0;
+       u32 vset = 0;
        bool enable;
        int rc;