Message ID | 20180809190420.28093-7-simon.k.r.goldschmidt@gmail.com |
---|---|
State | Superseded |
Delegated to: | Marek Vasut |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nzFakVt4"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41md7G2R2dz9s3Z for <incoming@patchwork.ozlabs.org>; Fri, 10 Aug 2018 05:07:54 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 09387C21E08; Thu, 9 Aug 2018 19:06:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0B359C21DEC; Thu, 9 Aug 2018 19:05:50 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7C1ABC21D56; Thu, 9 Aug 2018 19:05:02 +0000 (UTC) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by lists.denx.de (Postfix) with ESMTPS id B1E68C21DAF for <u-boot@lists.denx.de>; Thu, 9 Aug 2018 19:04:58 +0000 (UTC) Received: by mail-wm0-f43.google.com with SMTP id o11-v6so1242927wmh.2 for <u-boot@lists.denx.de>; Thu, 09 Aug 2018 12:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X/WU24A/GBiM40ewgio4eYdhM1oYTY8oNDJVZ1GUZj0=; b=nzFakVt4PIyko4VE02be5BZleENbrQiDc3OvZEWRQ8Yek8B9M/LXAKr3kTtjHODlbY FRg6HhOwJWDTnyQn2paTs5jtWb4MlcMbkXleT/gAPVCQrintyeJkcn5dKAJgJ2G7e83Y nW9cEw1yYFg6ooVbT94FUSWtTpgmL/x+k+iA3mpXTT3iyEg4chODLZirJqp+fJtw0puu 7x7Yw3PG5dSLuebqXfgRbIoXGixSCw9CCmy6x3UkZqwoVRYA3wODCDaBV4kofifgY42F gJjc5Us792P7LgG/l31trVLvx+TbqPd9bvMisSn7sxD7QYRVErecp08aypqwAzsMNPHV RJOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=X/WU24A/GBiM40ewgio4eYdhM1oYTY8oNDJVZ1GUZj0=; b=OATwRWnAE1ac1LaE4iGhd8Xg9MnMExI3EagFkYu50HkidKKIe4hHQxG5L05UQEEb9Z Ow8ONDCBcz1pJQM/j97R8w1LAw7rAMOHE9+qtp7xZDcoxoVJz4F9rGDB/HkB+ZNssIPq P4ZyOFFrKAx24li67M2QL4Xmq1IYNG+qgZXaKYznNk9LDXJr3AlsDVqC7HKzfFzo0Znr jBczTmEUXOSmqUam2ErudlexlhEmY/Eys2cEHttv1eQEaqbxq4vYFMisJ2b3PXQ88gUC YPXkZDbPfwu3KFmjmOrlL09IGOUZKZigCFWJWP/RaaMMBoQaDbXxQaWChklpWhD0phvq Kwrg== X-Gm-Message-State: AOUpUlG/yZuvM/D6TyiLPRo/5A1oeMDJpAxSrbWssfG6E+aNYA4R0wwO eOeVQS7Z7aw6MLEWLsY5eoc= X-Google-Smtp-Source: AA+uWPyhXfafKw/mT0ui0cnMxVt6bRvaPTVTEDqirJQQh5y192pc6fovuzTSY7juHTh4LXTUbxm7Mw== X-Received: by 2002:a1c:8952:: with SMTP id l79-v6mr2268361wmd.7.1533841498477; Thu, 09 Aug 2018 12:04:58 -0700 (PDT) Received: from ubuntu.home ([2a02:8071:6a3:700:542c:ff11:9c97:a518]) by smtp.gmail.com with ESMTPSA id h7-v6sm8280575wrs.8.2018.08.09.12.04.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 12:04:57 -0700 (PDT) From: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> To: Marek Vasut <marex@denx.de> Date: Thu, 9 Aug 2018 21:04:20 +0200 Message-Id: <20180809190420.28093-7-simon.k.r.goldschmidt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180809190420.28093-1-simon.k.r.goldschmidt@gmail.com> References: <20180805193500.3693-1-simon.k.r.goldschmidt@gmail.com> <20180809190420.28093-1-simon.k.r.goldschmidt@gmail.com> Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 6/6] malloc_simple: calloc: don't call memset if malloc failed X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
Get socfpga gen5 SPL working again.
|
expand
|
diff --git a/common/malloc_simple.c b/common/malloc_simple.c index c14f8b59c1..871b5444bd 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -57,7 +57,8 @@ void *calloc(size_t nmemb, size_t elem_size) void *ptr; ptr = malloc(size); - memset(ptr, '\0', size); + if (ptr) + memset(ptr, '\0', size); return ptr; }