From: Kees Cook <keescook@chromium.org>
To: Colin King <colin.king@canonical.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] lkdtm: remove redundant initialization of ret
Date: Thu, 20 Jun 2019 18:13:32 +0000 [thread overview]
Message-ID: <201906201112.AE06471@keescook> (raw)
In-Reply-To: <20190614094311.24024-1-colin.king@canonical.com>
On Fri, Jun 14, 2019 at 10:43:11AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable ret is being initialized with the value -EINVAL however
> this value is never read and ret is being re-assigned later on. Hence
> the initialization is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks!
Acked-by: Kees Cook <keescook@chromium.org>
Greg, can you take this please?
-Kees
> ---
> drivers/misc/lkdtm/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/lkdtm/core.c b/drivers/misc/lkdtm/core.c
> index bba093224813..92df35fdeab0 100644
> --- a/drivers/misc/lkdtm/core.c
> +++ b/drivers/misc/lkdtm/core.c
> @@ -390,7 +390,7 @@ static int __init lkdtm_module_init(void)
> {
> struct crashpoint *crashpoint = NULL;
> const struct crashtype *crashtype = NULL;
> - int ret = -EINVAL;
> + int ret;
> int i;
>
> /* Neither or both of these need to be set */
> --
> 2.20.1
>
--
Kees Cook
WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Colin King <colin.king@canonical.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] lkdtm: remove redundant initialization of ret
Date: Thu, 20 Jun 2019 11:13:32 -0700 [thread overview]
Message-ID: <201906201112.AE06471@keescook> (raw)
In-Reply-To: <20190614094311.24024-1-colin.king@canonical.com>
On Fri, Jun 14, 2019 at 10:43:11AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable ret is being initialized with the value -EINVAL however
> this value is never read and ret is being re-assigned later on. Hence
> the initialization is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks!
Acked-by: Kees Cook <keescook@chromium.org>
Greg, can you take this please?
-Kees
> ---
> drivers/misc/lkdtm/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/lkdtm/core.c b/drivers/misc/lkdtm/core.c
> index bba093224813..92df35fdeab0 100644
> --- a/drivers/misc/lkdtm/core.c
> +++ b/drivers/misc/lkdtm/core.c
> @@ -390,7 +390,7 @@ static int __init lkdtm_module_init(void)
> {
> struct crashpoint *crashpoint = NULL;
> const struct crashtype *crashtype = NULL;
> - int ret = -EINVAL;
> + int ret;
> int i;
>
> /* Neither or both of these need to be set */
> --
> 2.20.1
>
--
Kees Cook
next prev parent reply other threads:[~2019-06-20 18:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 9:43 [PATCH][next] lkdtm: remove redundant initialization of ret Colin King
2019-06-14 9:43 ` Colin King
2019-06-20 18:13 ` Kees Cook [this message]
2019-06-20 18:13 ` Kees Cook
2019-06-21 13:50 ` Greg Kroah-Hartman
2019-06-21 13:50 ` Greg Kroah-Hartman
2019-06-21 14:03 ` Greg Kroah-Hartman
2019-06-21 14:03 ` Greg Kroah-Hartman
2019-06-21 14:05 ` Greg Kroah-Hartman
2019-06-21 14:05 ` Greg Kroah-Hartman
2019-06-21 16:26 ` Kees Cook
2019-06-21 16:26 ` Kees Cook
2019-06-23 5:00 ` Greg Kroah-Hartman
2019-06-23 5:00 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201906201112.AE06471@keescook \
--to=keescook@chromium.org \
--cc=arnd@arndb.de \
--cc=colin.king@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.