Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1801361pxk; Sat, 19 Sep 2020 02:48:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6VBK5yywszlwP7M8TZ3KBg1d6SU0RJ5bEBjqDGx+1bN/xmPuAkTDyzd82+FhcUKs+fFry X-Received: by 2002:a50:dec9:: with SMTP id d9mr43076333edl.145.1600508910996; Sat, 19 Sep 2020 02:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600508910; cv=none; d=google.com; s=arc-20160816; b=1Ap3vfJrPGv8vc6eS7ExmJNZwWczY7t4mGjoOm94Um7jvznt07EKjkQTxCPf6y2G8w pgcoKytqM3KxyHLXGZuu+sXwbyN2D/JAwk8jL2I+avlBZctsiFbBL2N+taCrz49yQDMB eWs9dhCXOg6Gjh3qaa8Aewa0a+3mGQ7T8bDurfuuJ4X51yRFGVFuKGp2xUDekriOOupF Rh7bYLs3hjea5wfkztELFV7HkADPZ5UKOfjhHR3EQ7f524kw5/j5RqAch+llOVNATofm mIFpks9oGwq/oKA9vgM1OuIm/LP65Lbh1aujLouaP705J3VYMCQKFd5jnkU/956iLFPV gSQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=e+Wz9FAJbPdYxgIZ5BhFn5k/+6rL4CAmNhTa67otDhs=; b=ExUuCikePOJqn9l7EsEpdjRjY9DIbDTf5elLDlrPD0/euQRqKWJT2MWniaPIFREtxf NwUa9fSYawKY4Yrvuj+VO4P5L7VWjUgZuXPT/DmR6CCHaHeKDV/UePwf9EiHnyVPxdOb k9F1mJAU5gC21jxSyTK1BIAeJ/97Z5YrtymIzQ29AC08eZ+tg2suuAvRnhaSDTFvP1g6 2eFUJAD3Pwy7Oo9KUP+NwranB286YLqhYf91Nm5INSRZtEeSFKPdYFdLBKGqO1DWF46E XgajDH6JZm/zmNloRt4rBoo8aO7Uu+Mce5tgoISgqKP01ntYBb4hFpmSHbocJ82JvLzv puZw== 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 k6si4050152eds.235.2020.09.19.02.48.07; Sat, 19 Sep 2020 02:48:30 -0700 (PDT) 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 S1726326AbgISJqi (ORCPT + 99 others); Sat, 19 Sep 2020 05:46:38 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:54758 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726200AbgISJqg (ORCPT ); Sat, 19 Sep 2020 05:46:36 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 85546458D285ADC0F536; Sat, 19 Sep 2020 17:46:31 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Sat, 19 Sep 2020 17:46:21 +0800 From: Liu Shixin To: Qiang Yu , David Airlie , "Daniel Vetter" CC: , , , Liu Shixin Subject: [PATCH -next] drm/lima: simplify the return expression of lima_devfreq_target Date: Sat, 19 Sep 2020 18:08:50 +0800 Message-ID: <20200919100850.1639111-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/gpu/drm/lima/lima_devfreq.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c index bbe02817721b..5914442936ed 100644 --- a/drivers/gpu/drm/lima/lima_devfreq.c +++ b/drivers/gpu/drm/lima/lima_devfreq.c @@ -35,18 +35,13 @@ static int lima_devfreq_target(struct device *dev, unsigned long *freq, u32 flags) { struct dev_pm_opp *opp; - int err; opp = devfreq_recommended_opp(dev, freq, flags); if (IS_ERR(opp)) return PTR_ERR(opp); dev_pm_opp_put(opp); - err = dev_pm_opp_set_rate(dev, *freq); - if (err) - return err; - - return 0; + return dev_pm_opp_set_rate(dev, *freq); } static void lima_devfreq_reset(struct lima_devfreq *devfreq) -- 2.25.1