From patchwork Tue Oct 17 01:17:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Rowand X-Patchwork-Id: 10011025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3B4FB60211 for ; Tue, 17 Oct 2017 07:38:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D3352876A for ; Tue, 17 Oct 2017 07:38:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21B122877C; Tue, 17 Oct 2017 07:38:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C67AC2876A for ; Tue, 17 Oct 2017 07:38:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 175AB6E5AF; Tue, 17 Oct 2017 07:35:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id A7AA96E575 for ; Tue, 17 Oct 2017 01:18:21 +0000 (UTC) Received: by mail-pg0-x242.google.com with SMTP id k7so130094pga.3 for ; Mon, 16 Oct 2017 18:18:21 -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=8ZFGDqGMIBtqYydcPFJE5TbA+os+2K/Fktdvpqk16eQ=; b=LxzrhYed2PLgT5qgndgN6TvHyrwxMgVsdZvsFJ/IK6K9YLl2hjGY8IdP7GoStDnssG C+T08XeneeduLpt9uefWoeRLfjypuKMx4S3RwHIu3TF32fd6TrbfCXpeZ8WEUFN2UIU7 XTlPibp8rzcoz6+M+BX1gTbDynRM31/NVmEKKwxYSgSbJmKPLc7XxzP+s/8fXnqPzCuz 6QtpkAtKsGmN+WhY9SyauxaoPkcmurrScO5zv0v8L+NgKVwVSsY/Mhe2/oYTqU3uYVnA Qo99XI87PMJHjtcVlxujJw/Y7qs2m82m0z2UDxsUZol9cc4yTjiUcPIGrtxXmhycp+bB F76g== 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=8ZFGDqGMIBtqYydcPFJE5TbA+os+2K/Fktdvpqk16eQ=; b=mbDwOK/lFn4JsVJkINkwIwLB1a1gmtS9X1ypc055+jQcSOyMs1aqsslixdtQeoY+yX z2gxoZi0P3ZMElKkpXKXBc83HkR07mIZcMFSZnJVvR+dF6rOcy0/E+rsbtHLQyHPlu4E cvE9/45zVy7Qihrua8qnvbUDys5ybMWaNXhkISqedXDXb50Mg1aocjFD8+l7ZLXeRGAM HBGEcre4Q5MFfeTU1CIivVJx+e79sMb6eVemBqK1oWg8SbTU3gSxuH4i2xJElqMVZCa6 3+ZEaUrK0O59ku7vQQZ6riw+uXa3Nzca1qYbDgccplRrMDQqreG1aBoI9UD64lQRNTe1 mkkA== X-Gm-Message-State: AMCzsaWn73Qyv4/zglx7oaruGj7uwIZqEp0F7kxUIwiNY++mHtiGXcWT PcQG+DSzU+aE02IGamEl4SM= X-Google-Smtp-Source: AOwi7QB4xqualXFXtAGumSSHZrHJ/2YTweKwRBtnCX2GBt8DA6pmviL6sTpVh2Xxd3YO331XXIpzIg== X-Received: by 10.99.147.69 with SMTP id w5mr9485225pgm.401.1508203101326; Mon, 16 Oct 2017 18:18:21 -0700 (PDT) Received: from localhost.localdomain (c-73-93-215-6.hsd1.ca.comcast.net. [73.93.215.6]) by smtp.gmail.com with ESMTPSA id f1sm16874283pfe.150.2017.10.16.18.18.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Oct 2017 18:18:20 -0700 (PDT) From: frowand.list@gmail.com To: Rob Herring , Pantelis Antoniou , David Airlie , Jyri Sarha Subject: [PATCH v2 12/12] of: overlay: remove unneeded check for NULL kbasename() Date: Mon, 16 Oct 2017 18:17:54 -0700 Message-Id: <1508203074-26917-13-git-send-email-frowand.list@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508203074-26917-1-git-send-email-frowand.list@gmail.com> References: <1508203074-26917-1-git-send-email-frowand.list@gmail.com> X-Mailman-Approved-At: Tue, 17 Oct 2017 07:35:19 +0000 Cc: Mark Rutland , devicetree@vger.kernel.org, Tomi Valkeinen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Frank Rowand kbasename() will not return NULL if passed a valid string. If the parameter passed to kbasename() in this case is already NULL then the devicetree has been corrupted. Signed-off-by: Frank Rowand --- drivers/of/overlay.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index a257474c9223..dc7657329aea 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -322,8 +322,6 @@ static int add_changeset_node(struct overlay_changeset *ovcs, int ret = 0; node_kbasename = kbasename(node->full_name); - if (!node_kbasename) - return -ENOMEM; for_each_child_of_node(target_node, tchild) if (!of_node_cmp(node_kbasename, kbasename(tchild->full_name)))