From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE600C433E1 for ; Wed, 3 Jun 2020 01:12:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C06D120663 for ; Wed, 3 Jun 2020 01:12:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728372AbgFCBMe (ORCPT ); Tue, 2 Jun 2020 21:12:34 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:41730 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726112AbgFCBMd (ORCPT ); Tue, 2 Jun 2020 21:12:33 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 71F915A433E1043B5189; Wed, 3 Jun 2020 09:12:31 +0800 (CST) Received: from [127.0.0.1] (10.166.215.204) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Wed, 3 Jun 2020 09:12:22 +0800 Subject: Re: [PATCH] pinctrl: sirf: Add missing put_device() call in sirfsoc_gpio_probe() To: Markus Elfring , , CC: , , "Yi Zhang" , Barry Song References: <01abac73-2107-daf2-d7bd-bef9d73d554a@web.de> From: "yukuai (C)" Message-ID: <0c3372cf-342f-81c7-fab8-4a68e59ebbd2@huawei.com> Date: Wed, 3 Jun 2020 09:12:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <01abac73-2107-daf2-d7bd-bef9d73d554a@web.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.166.215.204] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/6/3 2:56, Markus Elfring wrote: >> in sirfsoc_gpio_probe(), if of_find_device_by_node() succeed, >> put_device() is missing in the error handling patch. > > How do you think about another wording variant? > > A coccicheck run provided information like the following. > > drivers/pinctrl/sirf/pinctrl-sirf.c:798:2-8: ERROR: missing put_device; > call of_find_device_by_node on line 792, but without a corresponding > object release within this function. > > Generated by: scripts/coccinelle/free/put_device.cocci > > Thus add a jump target to fix the exception handling for this > function implementation. > > > Would you like to add the tag “Fixes” to the commit message? > Will do, thanks for your advise! Yu Kuai