From patchwork Mon May 16 02:47:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MyungJoo Ham X-Patchwork-Id: 9098231 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7633B9F1D3 for ; Mon, 16 May 2016 02:47:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1794F201FE for ; Mon, 16 May 2016 02:47:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42C7A201B4 for ; Mon, 16 May 2016 02:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752137AbcEPCrF (ORCPT ); Sun, 15 May 2016 22:47:05 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:38538 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751921AbcEPCrD (ORCPT ); Sun, 15 May 2016 22:47:03 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O79035A612D9JB0@mailout3.samsung.com> for linux-pm@vger.kernel.org; Mon, 16 May 2016 11:47:01 +0900 (KST) Received: from epcpsbgx2.samsung.com ( [172.20.52.115]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 83.61.05082.5A439375; Mon, 16 May 2016 11:47:01 +0900 (KST) X-AuditID: cbfee68e-f79b26d0000013da-a2-573934a519a7 Received: from epmailer01 ( [203.254.219.141]) by epcpsbgx2.samsung.com (EPCPMTA) with SMTP id 04.56.05247.5A439375; Mon, 16 May 2016 11:47:01 +0900 (KST) Date: Mon, 16 May 2016 02:47:01 +0000 (GMT) From: MyungJoo Ham Subject: [PATCH] PM / devfreq: remove double put_device To: linux-pm@vger.kernel.org Cc: myungjoo.ham@gmail.com Reply-to: myungjoo.ham@samsung.com MIME-version: 1.0 X-MTR: 20160516024624179@myungjoo.ham Msgkey: 20160516024624179@myungjoo.ham X-EPLocale: ko_KR.utf-8 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20160516024624179@myungjoo.ham X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general Content-transfer-encoding: base64 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 Message-id: <531029804.743801463366821536.JavaMail.weblogic@ep2mlwas03c> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprMKsWRmVeSWpSXmKPExsWyRsSkWHepiWW4wZ4pGhafe48wOjB6fN4k F8AYJWKTkpqTWZZapG+HYCWIZCx6+ZGtYBd7xbTJP1gaGOewdzFycggJqEssWnKSDcSWEDCR aN6xnAXCFpO4cG89UJwLqGYpo8SF1zeBGjjAiq52F0HE5zBKvNrfxwTSwCKgKrHj8h4mkBo2 AT2JmZ+TQcLCAuYSs19NBNslIqAocff8e7D5zALyEh92XGGDuEFJYs2+V2BxXgFBiZMzn0Dd oCpxeu5zqLiaxIy1t5kh4uISF+ZeYoeweSVmtD+FqpeTmPZ1DVSNtMT5WRsYYX5Z/P0xVJxf 4tjtHUwQtoDE1DMHoWq0JJYd2w8V55NYs/AtC0z9rlPLmWF23d8yF6pGQmJryxNWiF8UJaZ0 PwQHD7OApsT6XfroXuEV8JBYd34FKyjYJAQucEgcurCZdQKj0iwkdbOQjJqFMApZyQJGllWM oqkFyQXFSelFRnrFibnFpXnpesn5uZsYgYni9L9nfTsYbx6wPsSozsEoJVqaV5ycmJeXmJST Gp+bmJOWX5SbmqLEwyvwzSJciDWxrLgy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maVEk/OBaTevJN7Q2NjEzMTU0sTC wNRcSZw34O+6MCGB9MSS1OzU1ILUIpg+Jg5OqQZGOUb1moDTKfMCpxeE3i6aU1b/7v1fRw/x P8XM+6ZPkDsRMmf5rTMBTG+UNbn5+LTTJqwQ6Jd4Hq+85tTha4+v7mtLra5VKQs4sImFWfTF JDGbxE7txZ3njLymlDlKMGvxhCze1db5/ahk682Vn/Iip0Xl6nyaHOua8os1W//rNfVNlxZv iPurxFKckWioxVxUnAgAH9JWQYMDAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, MIME_BASE64_BLANKS, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 When device_register() returns with error, it has already done put_device() on the input device pointer. Signed-off-by: MyungJoo Ham --- drivers/devfreq/devfreq.c | 1 - 1 file changed, 1 deletion(-) -- 1.9.1 diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 4f6079e..5200728 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -528,7 +528,6 @@ struct devfreq *devfreq_add_device(struct device *dev, dev_set_name(&devfreq->dev, "%s", dev_name(dev)); err = device_register(&devfreq->dev); if (err) { - put_device(&devfreq->dev); mutex_unlock(&devfreq->lock); goto err_out; }