Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2049667pxu; Sun, 6 Dec 2020 17:08:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwRU9CPfc9ctBZe6nthfj84bMrstw3L4B9dTVBuE+fKIy+I+rCIyOGlTBIxzF5u5D4+Z5C X-Received: by 2002:aa7:cc19:: with SMTP id q25mr17533876edt.290.1607303320294; Sun, 06 Dec 2020 17:08:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607303320; cv=none; d=google.com; s=arc-20160816; b=RrOdVX3BksKIcdUoCn3qS4rM+nsRjjpYjDhkFX66MRnk2Ue1ESlzjZ65HYNP+D95q+ SmNMSLPa8Aq7baBwFK/zBIN2cmj7I1b+w17XfxMFAMql7J1BlNTo5rSc4EHPqTjdJcqi 5FL3CNUee0pOS/99F72Z7BZkuB/qi8eh9413gao4JjhQ43KkDv8/4DX9Rlrq2qQbtME+ uCqHc5yiEmKXA8Aie7UfMjZrxxPXZIhuxnY7VWg3x68kfPYhl/S4lfDE7NNU/HRgJQf9 +6m+uaiS2AaS3JP/pgMBj999Hsy0b8O8/fBV6orKRTS4JA0sfOwMVo/jmSRRA1zvlF3P 661Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=CKMCoqKQedIyYwVTvfh8xtBkBK7fla4oIiVIMgErNyE=; b=Ei60Cnuq8DOW9+FYv9rl3Eb47k8boWfGC+/PG4GyyhLvmawx1O56zW4Ra6m49MNejN SOvIUe3nldZV1kGWagd4XrXnorXt4Vy9PGrKHEzZUDREMt8Y6slrGJVaXFcsYl7VqeC+ 29RUo8VJ74QaSez91StbICxG7jaSEjvrruvA7E+ovi4WmciceDpjeDmZrF5s7j8wOlBw JZ6zLRgHB8qPFW74i6KbZ3QfuXdAfEnsvnVMi1c1E0gV0diCrOyMO/tT5zjvRU45NduI JDL760CfCTsr38eLW/xnVu7jbDzIYU+6fIR4j4wTYuwKEcHnEL0iO9XcYGr7XCytRf8c d7gQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp16si5865770ejc.614.2020.12.06.17.08.14; Sun, 06 Dec 2020 17:08:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728495AbgLGBEr (ORCPT + 99 others); Sun, 6 Dec 2020 20:04:47 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:8701 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbgLGBEr (ORCPT ); Sun, 6 Dec 2020 20:04:47 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Cq4n808PHzkmFw; Mon, 7 Dec 2020 09:03:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Dec 2020 09:04:00 +0800 From: Tian Tao To: , , , , CC: , Subject: [PATCH] drm/drv: switch to using devm_add_action_or_reset() Date: Mon, 7 Dec 2020 09:04:15 +0800 Message-ID: <1607303055-5199-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org switch to using devm_add_action_or_reset() instead of devm_add_action. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_drv.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 7343038..b92f7fd 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -675,11 +675,8 @@ static int devm_drm_dev_init(struct device *parent, if (ret) return ret; - ret = devm_add_action(parent, devm_drm_dev_init_release, dev); - if (ret) - devm_drm_dev_init_release(dev); - - return ret; + return devm_add_action_or_reset(parent, + devm_drm_dev_init_release, dev); } void *__devm_drm_dev_alloc(struct device *parent, -- 2.7.4