From patchwork Tue Sep 13 19:16:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 76119 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1517743qgf; Tue, 13 Sep 2016 12:16:27 -0700 (PDT) X-Received: by 10.66.229.9 with SMTP id sm9mr4075286pac.138.1473794187365; Tue, 13 Sep 2016 12:16:27 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7si64577pab.271.2016.09.13.12.16.26; Tue, 13 Sep 2016 12:16:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760126AbcIMTQZ (ORCPT + 27 others); Tue, 13 Sep 2016 15:16:25 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:35623 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755419AbcIMTQX (ORCPT ); Tue, 13 Sep 2016 15:16:23 -0400 Received: by mail-pf0-f177.google.com with SMTP id z123so12352867pfz.2 for ; Tue, 13 Sep 2016 12:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Sv93ROhwmVdnCOlP9EE5gUDX7McZFN9ZBE/V3euVnmU=; b=jrWEB5KfGgpjPH+VNdupXbvNLP+bFOwHjzSWL1r4s73pnFB9I4O0uDbaB7G9OeC/Ef Ni3NTefB1uWKpMZnhhHbsQ9fsb59cbXkDu1LSZW93G0E5Xq6FkERk6poSl9p3XjYRsjJ ju2ctgzdvtiU74ts8XwhagGm8og2IGbXA2gVU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Sv93ROhwmVdnCOlP9EE5gUDX7McZFN9ZBE/V3euVnmU=; b=DtSHydIl3ojNIFfiO4bBofyBzDc4FHLlA0+yIGElymtYAk4T7cKXpB2I3FDhD5CTpP BzrQFzy9DsYoBVhRsNKLb5qwx8TbdQopK1t7AT9Ggclzm743sy7KeWccr4VdruzOtCXR weQ+lWXNKzgadHKovBQpaHgCBsvSRk1yRiliVyWhEZSu6fSzSUpDOA4RIctDrp2U9V8E kIlY5UkpChdzG2f0pEisVR+yYF7/gQJ8/91/heEatxY0tpiz9CoOQz5gT/NYmsBpGY93 /FNt86gx8R0GTu+E7Xy1lOJK2iqWmpXbHfurdxA+4FCpHcgbbLeOo8roBvGEUiOMbrmg CYMQ== X-Gm-Message-State: AE9vXwMcP0HJ9T5Le8x5iOinu4axiFOa0qqERM1NPoDTeQLFVaqO4I1QEsVb3KmqzXOv0Ueu X-Received: by 10.98.113.135 with SMTP id m129mr4114923pfc.41.1473794182585; Tue, 13 Sep 2016 12:16:22 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id l128sm32845072pfl.21.2016.09.13.12.16.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Sep 2016 12:16:21 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] remoteproc: Drop unnecessary NULL check Date: Tue, 13 Sep 2016 12:16:20 -0700 Message-Id: <1473794180-9420-1-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rproc_alloc() will make sure that the "firmware" pointer is either a driver supplied value or pointing to a generated firmware filename, it can't be NULL. So drop the extra check in the rproc_boot() path. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/remoteproc_core.c | 7 ------- 1 file changed, 7 deletions(-) -- 2.5.0 diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 0d3c191b6bc3..92a1037c1b2e 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1034,13 +1034,6 @@ static int __rproc_boot(struct rproc *rproc, bool wait) return ret; } - /* loading a firmware is required */ - if (!rproc->firmware) { - dev_err(dev, "%s: no firmware to load\n", __func__); - ret = -EINVAL; - goto unlock_mutex; - } - /* prevent underlying implementation from being removed */ if (!try_module_get(dev->parent->driver->owner)) { dev_err(dev, "%s: can't get owner\n", __func__);