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: 9329847 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 D88C5607FD for ; Tue, 13 Sep 2016 19:16:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC684295C4 for ; Tue, 13 Sep 2016 19:16:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1344295C7; Tue, 13 Sep 2016 19:16:26 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD744295C4 for ; Tue, 13 Sep 2016 19:16:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759683AbcIMTQY (ORCPT ); Tue, 13 Sep 2016 15:16:24 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:35941 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759605AbcIMTQX (ORCPT ); Tue, 13 Sep 2016 15:16:23 -0400 Received: by mail-pf0-f174.google.com with SMTP id 128so66233856pfb.3 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=iaTEFcteSYqWW6JhRz6iVBhMLRaMnr66bmQwyBbzpJFDZwGd9Fm3coLMwSvbaumlb6 T9qES+MPf1CcBYHQqOK2aa8ai8s/khRlmj9G8NW5BWcits5Yt4C1lI+IxWVYJVWSAmKC dSIDpflRGmBK+9PlCvVmcTZzg1KvZAxIfvCKeDRQhorC+BUDfHNTTKM0mVUBS9D37wFM X+bLRszFA7upojy3fbkZkTQpR+kVNyGYlfqgjGfy+bJ361WX3TQU6eSvwupM36H/YgIc tMFR7aiTSfb6jdg1ORe4vPo+YnD6NEsxh3hPqo/I3JbgtDmxcR4PsiB3qe/9rddRRshI 577A== X-Gm-Message-State: AE9vXwN48qI4TGRcYcMUOM2o8w9lHeBWCaVRh4tIu5LIYljztcQ/vBulE342SsudloLU7oLA 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-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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__);