Received: by 10.192.165.156 with SMTP id m28csp948584imm; Wed, 18 Apr 2018 00:59:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Ya4GZWcdnTxfXtSsCgSyhmCmMU6CDiT6f+lG3xTtPsMmxEICNZfeq7RPH0Zh7WuzVzlmr X-Received: by 2002:a17:902:aa90:: with SMTP id d16-v6mr1105382plr.189.1524038343286; Wed, 18 Apr 2018 00:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524038343; cv=none; d=google.com; s=arc-20160816; b=aoOoNJ0n0HwtG0ENVjy/9JpU2/OrWfyzv23FR4HECrd3oFWbfyQoTbpFXEYf/j7NBO rxNh7p7pfJBzjQxWcsojDbAe1Co9sx8YqKwjD5H84w2ZDk4GLc0J3dBKdQlI+WBkqH41 ptTroIuEpprDS/6BAJpZLOD+mH6Lhq1LqTsE2F4FlIj2ZgVpmBufhKE5T/QNuL7krGUo mffUBGM2MxDxLXzktuekGlFAZNEOR/kc1qSuBOrTyTI6RvZVRtajQp4Mv65f7KA17Z+s sM3feblenOwLeSqn46RLmYLts7B45vy0szsU5+Uk8MEpPgrEBAsrpYYXc6AO9S5KqscU FUXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:date:message-id:in-reply-to:cc:to:from :reply-to:subject:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=BUcUC84rsDjLPyv6uXYm6Pl1pQafy+zlNo53jxN/oDw=; b=JQPh97/OF0JQSF6X75/WyC4uHgHsTyBAxkbh7JPkxfPp0P1odNrXxW+BD34kwB/1ec P2oLx6gGf4XtaWwSoS+2m+qlMWTJ9hDF06x7OmJUKsGhhXeflZIqJQFfbGX5r7/lI7sH cZ4o3CDo+vVvUa5u2xqaiGLj2E4yueK1dfcC3KbQihyX8QJ2baaPLFChQaA6cyEXi078 X7RrswzGfK8lndRRmgk0uaj3WDjYQGONbyBidRYo+eedRvxw9CkDNkuqjkcjoeiGBQGI LejmtJwsYL6/8/EsU2UflNLAHdwWgYHRQr3+XaNwWO1l6bOQ3Q3nPCe7O3l1zOLLW1D2 FhSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Ml1nOKTN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay12-v6si655507plb.554.2018.04.18.00.58.49; Wed, 18 Apr 2018 00:59:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Ml1nOKTN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751870AbeDRH5k (ORCPT + 99 others); Wed, 18 Apr 2018 03:57:40 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:58378 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbeDRH5i (ORCPT ); Wed, 18 Apr 2018 03:57:38 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20180418075736epoutp0332a75d1a9ae7bdfd828945e09f681865~meLguYgyr2545825458epoutp03Z for ; Wed, 18 Apr 2018 07:57:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20180418075736epoutp0332a75d1a9ae7bdfd828945e09f681865~meLguYgyr2545825458epoutp03Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1524038256; bh=BUcUC84rsDjLPyv6uXYm6Pl1pQafy+zlNo53jxN/oDw=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=Ml1nOKTNqU9oM5Q86t91uwM8+oJxiRTnwA6iTfYqxyHUghOD/wly7IV1EMmx3HM00 ZyLmZwpNlPsL/npp6ryuwn4bwq9VL5Jzq7TbqfRzYsB1h+fpT818pfdYZFzvBk+soH SY5kpoz9AR/dpnEkSlyGIK1LbGCh1SUQqyzZFOYg= Received: from epsmges1p1.samsung.com (unknown [182.195.40.69]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180418075736epcas1p2bf4f8f2639f7aca2e67546b5ecfcb57a~meLgaYWGS2362223622epcas1p2g; Wed, 18 Apr 2018 07:57:36 +0000 (GMT) X-AuditID: b6c32a35-151ff70000000fee-14-5ad6fa6f183a Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id E0.6E.04078.F6AF6DA5; Wed, 18 Apr 2018 16:57:35 +0900 (KST) Mime-Version: 1.0 Subject: RE: Re: [PATCH] PM / devfreq: use put_device() instead of kfree() Reply-To: myungjoo.ham@samsung.com From: MyungJoo Ham To: Chanwoo Choi , arvindY , Kyungmin Park CC: "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <5AD01937.1070504@samsung.com> X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20180418075735epcms1p3c59f097441aabc6af5d7892298c6fdb2@epcms1p3> Date: Wed, 18 Apr 2018 16:57:35 +0900 X-CMS-MailID: 20180418075735epcms1p3c59f097441aabc6af5d7892298c6fdb2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-MTR: 20180418075735epcms1p3c59f097441aabc6af5d7892298c6fdb2 CMS-TYPE: 101P X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFKsWRmVeSWpSXmKPExsWy7bCmvm7+r2tRBo1fLCyu9S5ktrj+5Tmr xdmmN+wWl3fNYbP43HuE0YHVY+esu+wefVtWMXp83iQXwByVapORmpiSWqSQmpecn5KZl26r 5B0c7xxvamZgqGtoaWGupJCXmJtqq+TiE6DrlpkDtFJJoSwxpxQoFJBYXKykb2dTlF9akqqQ kV9cYqsUbWhopGdoYK5nZGSkZ2Ica2VkClSSkJqx8MgaloK9AhWvX81gbmBsEehi5OSQEDCR OPL8IFsXIxeHkMAORokHMw+ydDFycPAKCEr83SEMUiMs4CXxe9oOZhBbSEBJouHmPmaIuL5E x4NtjCA2m4CuxNYNd1lAbBGBKokXtw6C2cxA9pO5Z9ggdvFKzGh/ygJhS0tsX74VrJdTQFvi xM+77BBxUYmbq9/C2e+PzWeEsEUkWu+dZYawBSUe/NwNFZeSePJ2IVR9vcT1z4uYQH6REJjA KPH7xn+ohL7EoyuzwY7gFfCV2P3mOFicRUBV4un+ViaIGheJDRMhDmIGOmjZwtfMoHBgFtCU WL9LH6LEVuL+/kmsECV8Eu++9rDC/LVj3hOoMWoSh3YvgVorI3F6+kKomz0kns27A2U7SjSs Xcg+gVFxFiKkZyFZPAth8QJG5lWMYqkFxbnpqcWGBYZ6xYm5xaV56XrJ+bmbGMHpTst0B+OU cz6HGAU4GJV4eBcIXIsSYk0sK67MPcQowcGsJMK78/GVKCHelMTKqtSi/Pii0pzU4kOMpkD/ T2SWEk3OB6bivJJ4QxNLAxMzI2CKszQ0VBLnfepzJkpIID2xJDU7NbUgtQimj4mDU6qB0UKc 97uqaFJ69eEzFQmMjR3FD0L21v2d9vZ6a+rJ/ttamulhIaGb/Pv93nS3vIxL2f/qe69q8AbG P/bnT3+aVHX+U8ZO47Ls6/OtJx2O54wU+toTuOXA6jfXrm9WiUpdrDL3YtKdlG3iD6U3i01+ Gfu5UW6VwWTtsNm3g2ZzzV/Gtdd/tWTpLiWW4oxEQy3mouJEAIHV8rmNAwAA DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180330114418epcas5p1affd1c3d97e7422dd33e6d3ca73073be X-RootMTR: 20180330114418epcas5p1affd1c3d97e7422dd33e6d3ca73073be References: <5AD01937.1070504@samsung.com> <5AD001C5.2040406@samsung.com> <5AD0041D.2050506@samsung.com> <5AD012CB.7030003@gmail.com> <5AD0160E.7050601@samsung.com> <5AD017E8.7020901@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >On 2018=EB=85=84=2004=EC=9B=94=2013=EC=9D=BC=2011:37,=20arvindY=20wrote:= =0D=0A>>=20On=20Friday=2013=20April=202018=2007:59=20AM,=20Chanwoo=20Choi= =20wrote:=0D=0A>>>=20On=202018=EB=85=84=2004=EC=9B=94=2013=EC=9D=BC=2011:15= ,=20arvindY=20wrote:=0D=0A>>>>=20On=20Friday=2013=20April=202018=2006:43=20= AM,=20Chanwoo=20Choi=20wrote:=0D=0A>>>>>=20On=202018=EB=85=84=2004=EC=9B=94= =2013=EC=9D=BC=2010:03,=20Chanwoo=20Choi=20wrote:=0D=0A=5B=5D=0D=0A>>>>>>>= =20diff=20--git=20a/drivers/devfreq/devfreq.c=20b/drivers/devfreq/devfreq.c= =0D=0A>>>>>>>=20index=20fe2af6a..a225b94=20100644=0D=0A>>>>>>>=20---=20a/dr= ivers/devfreq/devfreq.c=0D=0A>>>>>>>=20+++=20b/drivers/devfreq/devfreq.c=0D= =0A>>>>>>>=20=40=40=20-625,7=20+625,8=20=40=40=20struct=20devfreq=20*devfre= q_add_device(struct=20device=20*dev,=0D=0A>>>>>>>=20=20=20=20=20=20=20=20er= r=20=3D=20device_register(&devfreq->dev);=0D=0A>>>>>>>=20=20=20=20=20=20=20= =20if=20(err)=20=7B=0D=0A>>>>>>>=20=20=20=20=20=20=20=20=20=20=20=20mutex_u= nlock(&devfreq->lock);=0D=0A>>>>>>>=20-=20=20=20=20=20=20=20=20goto=20err_d= ev;=0D=0A>>>>>>>=20+=20=20=20=20=20=20=20=20put_device(&devfreq->dev);=0D= =0A>>>>>>>=20+=20=20=20=20=20=20=20=20goto=20err_out;=0D=0A>>>>>>>=20=20=20= =20=20=20=20=20=7D=0D=0A>>>>>>>=20=20=20=20=20=20=20=20=20=20devfreq->trans= _table=20=3D=20=20=20=20devm_kzalloc(&devfreq->dev,=0D=0A>>>>>>>=20=40=40= =20-671,6=20+672,7=20=40=40=20struct=20devfreq=20*devfreq_add_device(struct= =20device=20*dev,=0D=0A>>>>>>>=20=20=20=20=20=20=20=20mutex_unlock(&devfreq= _list_lock);=0D=0A>>>>>>>=20=20=20=20=20=20=20=20=20=20device_unregister(&d= evfreq->dev);=0D=0A>>>>>>>=20+=20=20=20=20devfreq=20=3D=20NULL;=0D=0A>>>>>>= >=20=20=20=20err_dev:=0D=0A>>>>>>>=20=20=20=20=20=20=20=20if=20(devfreq)=0D= =0A>>>>>>>=20=20=20=20=20=20=20=20=20=20=20=20kfree(devfreq);=0D=0A>>>>>>>= =0D=0A=0D=0AAh..=20this=20was=20critcal.=20Thanks=21=0D=0A=0D=0AAcked-by:= =20MyungJoo=20Ham=20=0D=0A=0D=0A>Reviewed-by:= =20Chanwoo=20Choi=20=0D=0A=0D=0A=0D=0ACheers,=0D= =0AMyungJoo=0D=0A