Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5919594imu; Sun, 20 Jan 2019 23:26:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN61kFv3RKdwa4+OPIPO9L6W/A0guXiKizZg0SKplnhE1qUaP7EWFfNS5ASKtRpdDPVsyatH X-Received: by 2002:a63:5c22:: with SMTP id q34mr27018557pgb.417.1548055578624; Sun, 20 Jan 2019 23:26:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548055578; cv=none; d=google.com; s=arc-20160816; b=sFsxjll3onMa1FCJQPVB2BT2ukSz41SoPQIq5HMg3TFE5EfUdytXU4+arqIlA2Gixg a0SBJVYPakVtxffuJS3rlL8QVS9IxFsXevd4xhs8ji5/HYQ4Q62rx82Bo3Prwg4MJDHo BWmmaDgwUUZi52dBwsR2h0p1iAvCENLi+pEVQaw455kZuLRCezdIhgvo03IEe128AxZ3 K+4UYz2jW3k8Saolh78QgCA8aJJdurD9w08gU6vofgIVYdwkGLJbnf0diP3Xh8/3r1da gaO8y8edNcQrGLNnYFnucLDKW/gwPvF57R74G5cH3dRmkm4Ed9m4irh1l/82oq/KfFcS qXxQ== 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; bh=n7gckqyZyZLjOOQ09nraz2rV2FeNQAdB346VcThszXE=; b=XsPuvyX6D6i6kjZfjdTqCI9KoqxclE5kOTxUayo3iLGG+trg3YLoNfkfp+d4oXY1VI ZqKNOyDcilPcFNP3fFAM1u8g2yWYPK3Haaa29QpqM9hjXUikY8e4f7OkYl29ICvlXm9P kP7ErZ1VR6qEEgsQ+ta6gstpIW+7dAqkUTcstZ1Q2gB3DVgGKxjl1kPx3GJ/AiHCOgbU lPNotrIMrKCQqpDLqp+3xlTNqF0jZU/BrXs0ZbEGIQphwLLPw/0ppE3J+yzMkVBoIJtS 27XYy9KLTTnc1oAw7XmMTLuWVkKBEGZsuY3SZEhJSCCWy1kX8BeJj5qMIkbyDpgqGfSW NDWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WBwN8DYP; 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 m65si11865024pfg.282.2019.01.20.23.26.03; Sun, 20 Jan 2019 23:26:18 -0800 (PST) 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=WBwN8DYP; 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 S1728389AbfAUHXv (ORCPT + 99 others); Mon, 21 Jan 2019 02:23:51 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:56539 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727992AbfAUHXs (ORCPT ); Mon, 21 Jan 2019 02:23:48 -0500 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190121012753epoutp0288f97c57543fbd9e1206e371e8fc907f~7uMnGY4mv0822908229epoutp02M for ; Mon, 21 Jan 2019 01:27:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190121012753epoutp0288f97c57543fbd9e1206e371e8fc907f~7uMnGY4mv0822908229epoutp02M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1548034073; bh=n7gckqyZyZLjOOQ09nraz2rV2FeNQAdB346VcThszXE=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=WBwN8DYPV9xnA8H2hjGzvI9hTthLSgUvXvHJ8gz+uGMV4owjCq3kaxZJUWK0pbBwx l6pexgAS/F8dZQ2GsROBCrcKXXMBS/RCaojBYh29SsJby3NB0Ux7Yolfm4YxMP9POn WiU8rWPuobilnR8yCaX9nxwWCzlZGUdIouOQ597A= Received: from epsmges1p5.samsung.com (unknown [182.195.40.153]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190121012751epcas1p44d236a952bfad3d9bdb7ff43c154d7d9~7uMlFEmfs2102521025epcas1p4p; Mon, 21 Jan 2019 01:27:51 +0000 (GMT) X-AuditID: b6c32a39-1ce159c00000106e-8e-5c4520160cbf Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id F5.44.04206.610254C5; Mon, 21 Jan 2019 10:27:50 +0900 (KST) Mime-Version: 1.0 Subject: RE: [PATCH 2/3] PM / devfreq: fix missing check of return value in devfreq_add_device() Reply-To: myungjoo.ham@samsung.com From: MyungJoo Ham To: Kyungmin Park , Chanwoo Choi , "linux-pm@vger.kernel.org" CC: "linux-kernel@vger.kernel.org" , Yangtao Li X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20190119160454.23151-2-tiny.windzz@gmail.com> X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20190121012750epcms1p1b3fae992e1ae0f83c1d530feae02104c@epcms1p1> Date: Mon, 21 Jan 2019 10:27:50 +0900 X-CMS-MailID: 20190121012750epcms1p1b3fae992e1ae0f83c1d530feae02104c Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8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MAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20190119183509epcas1p27012fefeafe539c3f82030caf85ad308 References: <20190119160454.23151-2-tiny.windzz@gmail.com> <20190119160454.23151-1-tiny.windzz@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >devm_kzalloc() could fail, so insert a check of its return value. And >if it fails, returns -ENOMEM. > >Signed-off-by: Yangtao Li >--- > drivers/devfreq/devfreq.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c >index 076b1c2f40a4..923889229a0b 100644 >--- a/drivers/devfreq/devfreq.c >+++ b/drivers/devfreq/devfreq.c Acked-by: MyungJoo Ham