Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2744620rdb; Fri, 22 Sep 2023 07:21:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEo3irrw307ItJi3S76o7ac3nQMYrsaJc6LHSdC4CT28Tdp4rDWYPUgG3j/PjFC/SOY6cFW X-Received: by 2002:a17:902:e5c9:b0:1c5:daf1:270c with SMTP id u9-20020a170902e5c900b001c5daf1270cmr4939553plf.18.1695392461347; Fri, 22 Sep 2023 07:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695392461; cv=none; d=google.com; s=arc-20160816; b=w1GCjR3myW1LYpUYd8uruxcaZKRQjBCwhfqIKIlRkOPhdT1wwvRbyXDdIU52MK4Coh ttbS6RzdtNcYlAQzjBqhRf5sAorpKVzW6XwWhwPW3Xlc/Knf5Q0ihgR8otPPVzMCGd59 44h/E1KXf94AIn45FbjGGGrKdWrI/Homa4kI/3bKlhJ6nKGL8NTQ1nHaOdpKR05Jb6jO FlB/NnRI+M5pZuC+n0htwB4A8s5ROoSdoHvqNb0+f8zfSyjoWpU9YO4i8aO2XlsQsOTG exkG/J/sSvRXWjt1jU9txmikXJNxwNYBsh376gBWVGQTjAfSlt1fcNaImoX+tF8mQLAp dwzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=Ahl86MwZXr+YqMQ9RZ+afjaNkizX+5JO/dtLHweXa+0=; fh=qPTgbSCiIGgiqOXQt0gEYlC4w27kIPW2Fh0Ztr2UY1M=; b=fcXYQM4+1UbMDNaKLh4cGhBxBTkmL7kUyHvlwGiYwKUJO0XGq+rg6dtMm3FJ6GETBH EOW17kgfqR2O/37t/QqgKI21/T/zH/jShhQ+xT6rF4cg3APwGmku1t5fe/YLYvn+qkef LbeFuGDN+hb0iIRuP03cSZOlvrS2o/NySCrXV+eCrZ58G8Dd+Ir34rA6Rynvui5RJ4SP 6xXX2LnoIiTGQXETe00U9Qmq4wRvcfDNg+isHeAo88/9si0h/zLDUVM/H1TFqTm0V4pM N8/HlmbDvw8W3qIJp+kzsrG8K8eStr/3GD17mTSFXHfkY7WUrdrtctX9Z6Mm4yzKVVtr QdLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=gbo+nDcY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id q3-20020a170902e30300b001c20e55153esi3596470plc.496.2023.09.22.07.21.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 07:21:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=gbo+nDcY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2530D82DDF80; Fri, 22 Sep 2023 04:29:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233621AbjIVL3B (ORCPT + 99 others); Fri, 22 Sep 2023 07:29:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233384AbjIVL3A (ORCPT ); Fri, 22 Sep 2023 07:29:00 -0400 Received: from out-192.mta1.migadu.com (out-192.mta1.migadu.com [IPv6:2001:41d0:203:375::c0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B581FAC for ; Fri, 22 Sep 2023 04:28:53 -0700 (PDT) Message-ID: <5b5704d6-3eca-70a8-4dc4-3a37653e3956@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1695382131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ahl86MwZXr+YqMQ9RZ+afjaNkizX+5JO/dtLHweXa+0=; b=gbo+nDcY+K7sqWqfH1y+mtpLzXZVT+gU+uCU4HjweuzKp+hMT/maJL2DepzaWVkDhft0qn 3/17euRx65ZP5m8+32f6CksOSBABeWeo2tuCyATsoYzSAL+JkuJLAHOwjwHBN+S38DowYS Nl/4C0oOQKnS+VFKfWElQ9KPPYcfuaU= Date: Fri, 22 Sep 2023 12:28:47 +0100 MIME-Version: 1.0 Subject: Re: [PATCH] ptp: ocp: Fix error handling in ptp_ocp_device_init Content-Language: en-US To: Dinghao Liu Cc: Richard Cochran , Jonathan Lemon , Vadim Fedorenko , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230922094044.28820-1-dinghao.liu@zju.edu.cn> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20230922094044.28820-1-dinghao.liu@zju.edu.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 22 Sep 2023 04:29:03 -0700 (PDT) On 22/09/2023 10:40, Dinghao Liu wrote: > When device_add() fails, ptp_ocp_dev_release() will be called > after put_device(). Therefore, it seems that the > ptp_ocp_dev_release() before put_device() is redundant. > > Fixes: 773bda964921 ("ptp: ocp: Expose various resources on the timecard.") > Signed-off-by: Dinghao Liu Thanks! Reviewed-by: Vadim Feodrenko