From patchwork Sat Jul 16 15:05:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9233283 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6EA5A6075D for ; Sat, 16 Jul 2016 15:05:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FF0F205AF for ; Sat, 16 Jul 2016 15:05:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 546652223E; Sat, 16 Jul 2016 15:05:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7C1A205AF for ; Sat, 16 Jul 2016 15:05:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 055666E158; Sat, 16 Jul 2016 15:05:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.17.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 11BD26E158 for ; Sat, 16 Jul 2016 15:05:49 +0000 (UTC) Received: from [192.168.1.2] ([77.182.189.163]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0LdF4n-1ayU913JA1-00iXbT; Sat, 16 Jul 2016 17:05:42 +0200 Subject: [PATCH 6/8] drm/amdgpu: Change assignment for a variable in amdgpu_cgs_acpi_eval_object() To: dri-devel@lists.freedesktop.org, David Airlie , =?UTF-8?Q?Christian_K=c3=b6nig?= , Alex Deucher References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <558FB427.80103@users.sourceforge.net> From: SF Markus Elfring Message-ID: <5a7d8d95-0167-2bdc-784f-e1df6e49ad2b@users.sourceforge.net> Date: Sat, 16 Jul 2016 17:05:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:gGOiX46xNmm2z444VipoFsPjnVxOWIV5fOiK8MKCBCZZzoTHxYr Hsr7kIztIK6G7vlr6h3u/1V2GIu5XypX8Ec8t7Li/EvrCs6wuwvLJ5nHg99Tzfz/abHzrrm FBiFS9Jns9DUZIvOOITzfGegCskXQDk5R/XluevzZKeKQfpZJidaZ6KQuSLnvmT7e+rY2+P 5zdFEiArkFoa4VFn5AddQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:GRzr4WGA+zE=:gpLk+PXJbtvgUStEa4cfHz mjntqi/t+9rWr4GR0s4NnoGJjmvdlQ5K9o7sPDcxjbal/oNFeziQwQ8NmgrWAJZi69FMfDpXK IY2csHHSRnT0xMpNpmAEDSyo3uTw2DyhDlSjsrrcdB9AlBA0qmVwMEqxiFILSDnwsHZUg+4a4 4VaQe5cmuxA35p80duqYEuRCLOzQ+owxruIkcQ0bvpcN8pVfASeuZSGf0IsHxT6XJjzSjudX1 rKinDUzxJmH2RgOfNzCqrDgEJwh7V8Yfo7fswTyhxVHKYA4br5uCZVtmjnUxiv+IFBdLd2BDm 1SnPabRJEtrt1Vl5rRE4Bm2MdV3Pl2gSevHmtD5VXaFgJhtqXvOEEhskUOKGlu/b3zK/Xoc9Y FLI2yETA6YA2nbrtnPcTB+nnHbDaaCoKA48OtDFBUtlveLQCYeNLAfyeNNvKEUvHWZRh+5cHv mwQbeEnmQKXGWSLX72KSvWS3wuwnfFUuYwgKfQN2oyX+YhwrnnabkWu8oIFeqC4QAz31nyMwn 4+QkT+Nc51GrYsYv8LiIh/ZDPFr5bOFS05MTy9TA7hqpWwpXQOpwh/u2F/OS/kyyQSrCubkqu 9oeaU47cKQV58987xxQJMnTNsRsNi2/VmqT/H8PBqoep6TvURhQy9GkfuBWy/bW9pJwuW2Vrh kHt2gjJz2eKm8OibjMVXLaDeWFvtwnNskVaTbtIYkEumzSgIjizH3tvtz71M6FK9BoWw0/sd+ ych5w/m7Cu5M66/2mLFloPqhr45O2PJNXH+m5qe/Ihc4aOl03JWIDUxdq9hBHZk0JDRYavhmF +OfXjw3 Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 16 Jul 2016 15:05:45 +0200 Indicate successful function execution only at the end. Thus omit initialisation for the variable "result" at the beginning. Signed-off-by: Markus Elfring --- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c index 47f2a43..57859bd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c @@ -908,7 +908,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device, struct cgs_acpi_method_argument *argument; uint32_t i, count; acpi_status status; - int result = 0; + int result; handle = ACPI_HANDLE(&adev->pdev->dev); if (!handle) @@ -1049,6 +1049,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device, params++; } + result = 0; free_obj: kfree(obj); free_input: