From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNZsF-0006dI-6H for barebox@lists.infradead.org; Thu, 14 Jul 2016 06:11:53 +0000 Received: by mail-pa0-x241.google.com with SMTP id dx3so4137985pab.2 for ; Wed, 13 Jul 2016 23:11:30 -0700 (PDT) From: Andrey Smirnov Date: Wed, 13 Jul 2016 23:11:02 -0700 Message-Id: <1468476665-26409-4-git-send-email-andrew.smirnov@gmail.com> In-Reply-To: <1468476665-26409-1-git-send-email-andrew.smirnov@gmail.com> References: <1468476665-26409-1-git-send-email-andrew.smirnov@gmail.com> 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 4/7] mfd: syscon: Don't check xzalloc return for NULL To: barebox@lists.infradead.org Cc: Andrey Smirnov Xzalloc never returns NULL, so this check does not bring any value. Signed-off-by: Andrey Smirnov --- drivers/mfd/syscon.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c index 5fd22dd..9b873fe 100644 --- a/drivers/mfd/syscon.c +++ b/drivers/mfd/syscon.c @@ -116,8 +116,6 @@ static int syscon_probe(struct device_d *dev) struct resource *res; syscon = xzalloc(sizeof(struct syscon)); - if (!syscon) - return -ENOMEM; res = dev_get_resource(dev, IORESOURCE_MEM, 0); if (IS_ERR(res)) { -- 2.5.5 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox