From patchwork Sat Oct 22 14:33:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9390753 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 A688D60762 for ; Sat, 22 Oct 2016 14:33:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9704928EB1 for ; Sat, 22 Oct 2016 14:33:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8940528EB3; Sat, 22 Oct 2016 14:33: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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 F22CF28EB1 for ; Sat, 22 Oct 2016 14:33:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936000AbcJVOdZ (ORCPT ); Sat, 22 Oct 2016 10:33:25 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36195 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934263AbcJVOdY (ORCPT ); Sat, 22 Oct 2016 10:33:24 -0400 Received: by mail-pf0-f195.google.com with SMTP id r16so11480909pfg.3 for ; Sat, 22 Oct 2016 07:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CkP9pan0O6WaE8LSwKpr+bsS7UHm5/B7jrkIFZaTHQs=; b=STFvNuFa9V9270s8NjffxgsNqLWMxtjtegKJLugZuMPrjUIsgPyinfwWp4ZORCzXJi RFiUT//HVzKPqfni44IXbs/s38gNDs6oVZpKNwU64gMPCIdSW91nnlv0vEIIZNtmHzH2 Qm14a9hcK9u166CPv/X8P+rTByyZFbplQD3al3NWFTHkf3b1zQ92Wf9CgCCZDxBtblwx 8shhQNecRbgEpnrWeDHoWWSxH5AVtxAm4I6FAgAtUWfC85JWs4YLBkMJLIA98IRIMNpK 7DCIeodo4mZPnpCiz1Yq/i+400qcTm03ssPChwb7OD/ywHc8MI7dXu6+nAh7nRTehuO1 PzQQ== 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:mime-version :content-transfer-encoding; bh=CkP9pan0O6WaE8LSwKpr+bsS7UHm5/B7jrkIFZaTHQs=; b=cRSn/yDRTX/0fzMlOMoxAMEkYlbjGVzpwwtQqIq8zcGx5boPSi2hoWWcm6aNnXS33+ 4SDK3TSUD65njNXTREJFjFT2INEGc0eI32ZsFzxjpWADBPBZ98lyD64OEP+2JG/tOHKy o1GgAKrZkI9BF1x7V7eS6/fNJMnD44IOXEK8GJawRtshlynl+8peANSanwrwUzOYLPpK qVSXeo4BGDo3x0jA+KBrMP5QkFDNNAwoA4RUcsAx0I5TJXKL06klBtMDuiaJTYo/7g5A kHBpouedbrG3TApyayCQ3Er7xBa7ljQE+1BLCDbAMeqSJOjcUC3LlqXIUFrGJP3oejeQ YotA== X-Gm-Message-State: ABUngvcZ717IbiM6nNw8nbFDQYF/XhR9DfhBOTxchy9BK47SMFpHv76qlp8QWjUSAd7WFw== X-Received: by 10.99.215.5 with SMTP id d5mr9768587pgg.131.1477146804006; Sat, 22 Oct 2016 07:33:24 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id a88sm12929665pfe.21.2016.10.22.07.33.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Oct 2016 07:33:23 -0700 (PDT) From: Wei Yongjun To: Mark Brown Cc: Wei Yongjun , linux-spi@vger.kernel.org Subject: [PATCH -next] spi: omap2-mcspi: Remove redundant return value check of platform_get_resource() Date: Sat, 22 Oct 2016 14:33:17 +0000 Message-Id: <1477146797-30818-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun --- drivers/spi/spi-omap2-mcspi.c | 5 ----- 1 file changed, 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 3567e1d..79800e9 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -1386,11 +1386,6 @@ static int omap2_mcspi_probe(struct platform_device *pdev) regs_offset = pdata->regs_offset; r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (r == NULL) { - status = -ENODEV; - goto free_master; - } - mcspi->base = devm_ioremap_resource(&pdev->dev, r); if (IS_ERR(mcspi->base)) { status = PTR_ERR(mcspi->base);