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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham 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 5D09EC433ED for ; Fri, 14 May 2021 22:32:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E05661454 for ; Fri, 14 May 2021 22:32:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233941AbhENWdx (ORCPT ); Fri, 14 May 2021 18:33:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:54414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230330AbhENWdv (ORCPT ); Fri, 14 May 2021 18:33:51 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A4B04613F7; Fri, 14 May 2021 22:32:39 +0000 (UTC) Date: Fri, 14 May 2021 18:32:38 -0400 From: Steven Rostedt To: Zhen Lei Cc: Masami Hiramatsu , linux-kernel Subject: Re: [PATCH 1/1] tools/bootconfig: Fix error return code in apply_xbc() Message-ID: <20210514183238.07b96338@gandalf.local.home> In-Reply-To: <20210508034216.2277-1-thunder.leizhen@huawei.com> References: <20210508034216.2277-1-thunder.leizhen@huawei.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 8 May 2021 11:42:16 +0800 Zhen Lei wrote: > Fix to return a negative error code from the error handling case instead > of 0, as done elsewhere in this function. > > Fixes: a995e6bc0524 ("tools/bootconfig: Fix to check the write failure correctly") > Reported-by: Hulk Robot > Signed-off-by: Zhen Lei Masami, care to ack this? -- Steve > --- > tools/bootconfig/main.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c > index 7362bef1a368..6cd6080cac04 100644 > --- a/tools/bootconfig/main.c > +++ b/tools/bootconfig/main.c > @@ -399,6 +399,7 @@ static int apply_xbc(const char *path, const char *xbc_path) > } > /* TODO: Ensure the @path is initramfs/initrd image */ > if (fstat(fd, &stat) < 0) { > + ret = -errno; > pr_err("Failed to get the size of %s\n", path); > goto out; > }