From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XH8Wg-0003QW-DS for barebox@lists.infradead.org; Tue, 12 Aug 2014 09:37:55 +0000 From: Michael Olbrich Date: Tue, 12 Aug 2014 11:37:20 +0200 Message-Id: <1407836241-17620-1-git-send-email-m.olbrich@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/2] EFI: fix error handling in efi_get_boot() To: barebox@lists.infradead.org Cc: Michael Olbrich efi_get_global_var() returns an error code, not NULL when it fails. Signed-off-by: Michael Olbrich --- arch/efi/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c index ff97783..7de8ec8 100644 --- a/arch/efi/efi/efi.c +++ b/arch/efi/efi/efi.c @@ -104,7 +104,7 @@ struct efi_boot *efi_get_boot(int num) free(name); - if (!buf) { + if (IS_ERR(buf)) { free(boot); return NULL; } -- 2.0.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox