From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CE39C48BD1 for ; Thu, 10 Jun 2021 13:29:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82B4061412 for ; Thu, 10 Jun 2021 13:29:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231171AbhFJNbI (ORCPT ); Thu, 10 Jun 2021 09:31:08 -0400 Received: from mail-oo1-f48.google.com ([209.85.161.48]:34492 "EHLO mail-oo1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230188AbhFJNbI (ORCPT ); Thu, 10 Jun 2021 09:31:08 -0400 Received: by mail-oo1-f48.google.com with SMTP id i8-20020a4aa1080000b0290201edd785e7so6775109ool.1; Thu, 10 Jun 2021 06:28:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=usI/+u4XtISFZVHRz7Nuoee8ZW5mOj7emFTwtljSgXE=; b=MUoOo+XzHjn7QZ80fSGELN9sAxIl86paFnEYtXWWlpUHv8QYUn9ousZ5oeK0VZHJXL picEvHYR4QsJ1v1Yprr1nOtW5s3ngLxbzG8mihYkyDdZzdfJzziblXFt/uFRWZeH+eNH Qu1cLUXEVu/iNxSt86Mzkb0yGiMcUt5mbm8x+hcziAwT0sLWF5UrSCHWkp7SWj+JIHvh kzzzABOF1XOty8gwkUA5VrIm9yDG6qKt2/qMszg3AC7WDmhM0CJwTRIXwS5Daw9ZBUlV I6n9gGJ+e8gjZrw32R6i9vYW4/Y5EtPzHFtOAy9iuIxmV1X8B8p1fvVGZjHnIxbmb11r 7xAA== X-Gm-Message-State: AOAM533AGR9U+Q+lURTxZpqxaH+qXGTI8qdSfNKp+y7lY+4XQfEqogsF Tx+tLzpgs8c7g4dzfgBqGKaQqxOu0KoVIzc3yq8= X-Google-Smtp-Source: ABdhPJwBqjvhtrkp9WPzbG4Hw6L1O3KdsOrTkXommgDsWYtjLFOkEkfFrWR46znrKMXBXhvLcon3WaON28lz8M1ia7s= X-Received: by 2002:a4a:a9c8:: with SMTP id h8mr2410450oon.1.1623331736507; Thu, 10 Jun 2021 06:28:56 -0700 (PDT) MIME-Version: 1.0 References: <20210609173312.298414-1-colin.king@canonical.com> In-Reply-To: <20210609173312.298414-1-colin.king@canonical.com> From: "Rafael J. Wysocki" Date: Thu, 10 Jun 2021 15:28:45 +0200 Message-ID: Subject: Re: [PATCH][next] ACPI: scan: ensure ret is initialized to avoid garbage being returned To: Colin King Cc: "Rafael J . Wysocki" , Len Brown , Maximilian Luz , Daniel Scally , Andy Shevchenko , ACPI Devel Maling List , kernel-janitors@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Wed, Jun 9, 2021 at 7:33 PM Colin King wrote: > > From: Colin Ian King > > In the unlikely event that there are no callback calls made then ret > will be returned as an uninitialized value. Clean up static analysis > warnings by ensuring ret is initialized. > > Addresses-Coverity: ("Uninitialized scalar variable") > Fixes: a9e10e587304 ("ACPI: scan: Extend acpi_walk_dep_device_list()") > Signed-off-by: Colin Ian King > --- > drivers/acpi/scan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c > index c3067e8bfc47..0945d952f0fc 100644 > --- a/drivers/acpi/scan.c > +++ b/drivers/acpi/scan.c > @@ -2151,7 +2151,7 @@ int acpi_walk_dep_device_list(acpi_handle handle, > void *data) > { > struct acpi_dep_data *dep, *tmp; > - int ret; > + int ret = 0; > > mutex_lock(&acpi_dep_list_lock); > list_for_each_entry_safe(dep, tmp, &acpi_dep_list, node) { > -- Applied with some edits in the subject and changelog. Basically, if you make changes like this, please specify which piece of code you change in the subject/changelog. Thanks!