From patchwork Sat May 3 02:57:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 4105541 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EBE3CBFF02 for ; Sat, 3 May 2014 02:58:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 37F0920380 for ; Sat, 3 May 2014 02:58:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 72B3B2037D for ; Sat, 3 May 2014 02:58:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752541AbaECC6E (ORCPT ); Fri, 2 May 2014 22:58:04 -0400 Received: from mail-ve0-f171.google.com ([209.85.128.171]:41846 "EHLO mail-ve0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752465AbaECC6E (ORCPT ); Fri, 2 May 2014 22:58:04 -0400 Received: by mail-ve0-f171.google.com with SMTP id jy13so6354629veb.30 for ; Fri, 02 May 2014 19:58:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=03+vhf0Up8eSFUVAcRoOGcOGLCDsm0jQET9ByP6ZJs0=; b=iUPvIosQAEfgeC8wiYfg5wRkUe5v2/hsiw/LkIJfjQ/bw1gzWmhkON72hjRWlgyfA0 8v0w4kuLILdXaHF07AotnSKA5iM0xoYWSoEBe+fyuR3kLtRlBXMcNLHpHLTUSK6xFdca Q1O+tpogryouxi4Sz/YrfoC0m+SdgV0ENmLRe1ywp8i6kVaYEVQh1pjoDh9i1FOmJ7QE vldM6/SVxB0nL0wSWi+YQZCUCn33Il9qbip9mR5FlNbgjf8sbxvXo0Z4JiOSzUBwvKYj VylWoX8oyIoLdDivPVbez9033ej5UsveaNS2FeQEKT9+83aRUMb4ewP4BzsaineLGa3r Unqw== X-Gm-Message-State: ALoCoQlriaXycVaeYkCvC8nfpWLbv1Ho5719ynGx6xMAZhIVRrAbORD0y3MU7nQ12Z1qbnVoVodo X-Received: by 10.221.20.199 with SMTP id qp7mr15980475vcb.24.1399085882452; Fri, 02 May 2014 19:58:02 -0700 (PDT) Received: from [192.168.0.102] (218-164-140-186.dynamic.hinet.net. [218.164.140.186]) by mx.google.com with ESMTPSA id ml2sm1224660vec.9.2014.05.02.19.58.00 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 02 May 2014 19:58:01 -0700 (PDT) Message-ID: <1399085877.8748.0.camel@phoenix> Subject: [PATCH] spi: qup: Fix return value checking for pm_runtime_get_sync() From: Axel Lin To: Mark Brown Cc: "Ivan T. Ivanov" , linux-spi@vger.kernel.org Date: Sat, 03 May 2014 10:57:57 +0800 X-Mailer: Evolution 3.8.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pm_runtime_get_sync() returns 1 if !CONFIG_PM_RUNTIME. Signed-off-by: Axel Lin --- drivers/spi/spi-qup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c index b032e88..78c66e3 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -734,7 +734,7 @@ static int spi_qup_remove(struct platform_device *pdev) int ret; ret = pm_runtime_get_sync(&pdev->dev); - if (ret) + if (ret < 0) return ret; ret = spi_qup_set_state(controller, QUP_STATE_RESET);