From patchwork Wed Jun 8 01:58:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 9163229 X-Patchwork-Delegate: geert@linux-m68k.org 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 ACBDE60572 for ; Wed, 8 Jun 2016 01:58:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B2072835B for ; Wed, 8 Jun 2016 01:58:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DB9028371; Wed, 8 Jun 2016 01:58:47 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI 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 BF96A2835B for ; Wed, 8 Jun 2016 01:58:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754862AbcFHB6p (ORCPT ); Tue, 7 Jun 2016 21:58:45 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:11626 "EHLO relmlie4.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753880AbcFHB6o (ORCPT ); Tue, 7 Jun 2016 21:58:44 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie4.idc.renesas.com with ESMTP; 08 Jun 2016 10:58:41 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 4E4F04CE20; Wed, 8 Jun 2016 10:58:35 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 266412806E; Wed, 8 Jun 2016 10:58:35 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 0C5B228070; Wed, 8 Jun 2016 10:58:35 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id LAB11818; Wed, 8 Jun 2016 10:58:35 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="212987021" Received: from mail-pu1apc01lp0019.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.19]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 08 Jun 2016 10:58:34 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RwI8QnMA6b5RCg79Hi1cjFpIO+6HAkZgMOE2/V/+5P4=; b=ggkwZC+yiNDkYu571ibRqDQ6JXtoc2+89o3Dc/Hf4LWr2WWdobCjXp5S/ccZviTXm17/E34gIWV4aRPlvrn1FBP8LLwew8THTSrd58MmJpVrJnPo6Atubkl+4z2wldBoLbu2H2SO5oKVH1gRjC9akUQNoJj3D4X6bXuerfDJyJc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost (211.11.155.144) by SG2PR06MB0919.apcprd06.prod.outlook.com (10.162.204.152) with Microsoft SMTP Server (TLS) id 15.1.511.8; Wed, 8 Jun 2016 01:58:32 +0000 From: Yoshihiro Shimoda To: CC: , , , Yoshihiro Shimoda Subject: [PATCH] pwm: sysfs: get return value from pwm_apply_state() Date: Wed, 8 Jun 2016 10:58:23 +0900 Message-ID: <1465351103-3152-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR01CA0022.jpnprd01.prod.outlook.com (10.161.74.160) To SG2PR06MB0919.apcprd06.prod.outlook.com (10.162.204.152) X-MS-Office365-Filtering-Correlation-Id: 5dca9080-a778-47e5-b8a7-08d38f40657b X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0919; 2:q8fDj3DNy/ZxYH/b3OVqRLnfYOFkl8DLTSIxcmwBcOPXWMBlBA/zHOmdi81NgEkBJZyZUjWKueRivXyFwT6u1sSbjYT2b/7A0f9LBYzlN//xaTB5PmMT3oBClV99AFVHBrXb3RavFhj9k32Bskrcxo3mF6FzaNqrNopJHaodMGY2RM1QV3kAf5FLtfMR5QXT; 3:jAAQpXX301wZRxm9HcefU1/bKFxDKzPPWAOMSZvmCIy1+v6Iudxq9PYGTS2w7iOZmwN2SQ9H6wvLXPqpc+OLUBXECF1+fUwPcZF0mI0W0Xu2bfSxpJ+3+XRhz8o9W22w; 25:TP2XVK1OiHCNFqIi6Jj6csMGKnD7Cu0rDS/lHniYLpRwO99SR1RKmiiGNeVFyMLeL4S47adL3twFVa5E4YeTE50rvQD7jIqB/HmOTS558XVFv2Qyk6eVH+H5+YhhrJhtZhobLQuwPf07qtJDZE6cnm0D4ZDX5TzYK1SlBSROjeFyGKptTwqW9wGPlqllFm3INxbEe/nEjTNUiZW0pUstv85SayfVySglI/z9pLvv7CWGTWeuRPnpW/d5fDoT2foT1LpgtEWudnvi/2TffoF2eNJSS5ZfRUtKcjZawAvQJicYbQDkbr3s2vIAPJBck8+ijHXPK/MqCUwNlQL9EXJN85m4XF6UZfga7sVMe/DciJuwLnUvZrtb3zAlTF2sS5/8CcCgWsDNM7q0bLukyEQGqh8jE7EhswD/XgfDvJOKOq4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB0919; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0919; 20:bL5RD6/2Hjtopi2MopWKvVUtN+tCahf0IwYfVb1EnINwILnFd+rtZheaqVUu/nK33bqxFHQp8Xz73uuDkGOvWqNkrr+c4sjypEyJwrRMqNw2PxHkjA8XtufBpaKJlIdEDd+xpxqyeUQXUafBuYK74U6mMjTl4souKihgXDjxcL0z+MHf0E8HcUtIEl+lzkPi8kgqqhIwBo5C722k1beRwlXL6UFnVZI0QXby3LcGxWJmMsXyzqsQa0mthmxPj4q6nGA/LGpg56XrXo7h6vOjERrls6evhmufZ5xU6E3R3jLMR4Le7XYXPq92n+XK0S1DnFn1V1EG/1gGfdQfwKdmDI7LeZfRGrOUymlDGzf9h3wqpHYFq3FsMR1MDTQVOmkm+e0yUW1Ti1P1TbH+K4Q5qRwWPCPdRFIdrvPdwC751GjSHTX/wEn26DH1xnkcLGjimAnJHL03rsP/aRxAui280QToCK1cAQFKDxdkJJ+R27jyA5HIZ0IMRqF45Qv6EBp6; 4:p9bl4erTRvww4lZazwW18sjogg+4KvDHNb5msbNLDVueosnIVFGJn1pSL18qH4REMqwKlTz882cJ3v0qdTzV4PbIPl951EEaeA7qfeIOQG8bzv4Ord0C5CKGN5ow/8fFmU0XZKbLPsnE+JCuX2rn8V2uiMhDg18EJxfOubH4wmTkXrFDsH8z9JUK0xzga/qv3xmNfks+8KKLaoTwKznuJz2reujekUjtc1T+4XIozL+iTxdgOwcwyDyg9okZi+4MNPx8GiOCXRlA/SejR/r6hMk0K12waUHQzhwXn9vQnUqECDCcINSY+7coxu/9G//Iil/s3js8ZspaDIqUDFLKVlXJpN+K2szlVYqPfcnKq/tsIKReqBUOEsYUgQM1LbkxCFfbOGe/uIWHCXZd3xco9A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6058028); SRVR:SG2PR06MB0919; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB0919; X-Forefront-PRVS: 0967749BC1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6069001)(6009001)(189002)(199003)(97736004)(229853001)(110136002)(107886002)(4001430100002)(5003940100001)(2906002)(101416001)(81166006)(8676002)(189998001)(81156014)(4326007)(5008740100001)(19580405001)(47776003)(19580395003)(2351001)(92566002)(66066001)(68736007)(76506005)(50986999)(50226002)(50466002)(3846002)(6116002)(36756003)(48376002)(42186005)(33646002)(106356001)(78352004)(5004730100002)(105586002)(586003)(77096005); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB0919; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:0; A:0; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB0919; 23:zFffww/sKp7nhIrRUTlOnshIARKq8S2Zd/QnU9Qfa?= =?us-ascii?Q?3Op1p/utYf9UtfSXUkREDyQSECqypos+RCzUxOLv8pZhsNtcfj2a9K2WyexW?= =?us-ascii?Q?N/3l1wH3+nCeedMgkIlc9UaiT1pMJI3xuKC5h3WOFUQA5mif0ik0shxAJAyx?= =?us-ascii?Q?3bZQ/6rQ8jeex3Iyo0F+YjO9gZdqAzWWN7nI4bIJbzB3y7i0yxfOKOJdkmRu?= =?us-ascii?Q?xPe5Hlg43l+5iaB9QNAm1NtPCzE04sjvgAW01JF/T/LORTr1cQc//iOoGQ0+?= =?us-ascii?Q?sSkpgfOBbh+VAPCk954Tp+06eN79Wzh70kr/5wyfehgpwqld3aUNRVpq8YSa?= =?us-ascii?Q?AkqbbukqkVYMZqJeoDLli013iFMyqcmEN0RKJRIFRFSKJkAvea6zVOHlLZea?= =?us-ascii?Q?DsTo22Y8Pmq6WOADEa9NNInGUltmvwySSU2B0o2bTkr6nB3MAhDU+oAkRzKb?= =?us-ascii?Q?TdiKCyBmRplw4okm8Idya30e7vT/eeuX+5Zg3vShGCFC15NWdOGqpU8oBuH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LaJCwA4e/n/560+yJdAkyjVYyRGaUI3nFKTvsfuUWknrE6GMCKuA5Q0+he4bmA+0rtxHwHZ6V+IJHhboCCIpCm+m0iTUzp4XyPN6FO4yCSMuR8AaXllDB6b+1Sg5iH+iD/6MG0yAAfQ2Ze/U43L+TQmVg9SWAgF+0emEKI2mOlBWwELChKm34Am3Mt5/5/V8=; 20:9lUbOK/HXd3rjfc02jMNvA9lTqQWRdyP4+fQxE+1JB70i09MkLFaagkDGuM6FCkjvX+ztxnhOho2SnwjVlRAgLesafzZdx57rXI8XBoYqHcyUcP4fPJ8kFR5tb6U9bXvsovd9wbgwl/Bot36wJczLFlR/8C6GYjMZLIGlnmkCXU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2016 01:58:32.8126 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0919 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ryo Kodama This patch adds to check the return value from pwm_apply_state() used in enable_store(). The error of enable_store() doesn't work if the return value doesn't received. Signed-off-by: Ryo Kodama Signed-off-by: Yoshihiro Shimoda --- drivers/pwm/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c index d985992..01695d4 100644 --- a/drivers/pwm/sysfs.c +++ b/drivers/pwm/sysfs.c @@ -152,7 +152,7 @@ static ssize_t enable_store(struct device *child, goto unlock; } - pwm_apply_state(pwm, &state); + ret = pwm_apply_state(pwm, &state); unlock: mutex_unlock(&export->lock);