lkml.org 
[lkml]   [2016]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] ARM: qcom: silence an uninitialized variable warning
From
Date


On 04/12/2016 11:45 PM, Dan Carpenter wrote:
> 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>
>
> diff --git a/drivers/misc/qcom-coincell.c b/drivers/misc/qcom-coincell.c
> index 7b4a2da..829a61d 100644
> --- a/drivers/misc/qcom-coincell.c
> +++ b/drivers/misc/qcom-coincell.c
> @@ -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;
>
>
Looks OK to me. Thanks for the warning cleanup!

Acked-by: Tim Bird
-- Tim

\
 
 \ /
  Last update: 2016-04-14 03:01    [W:0.042 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site