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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CE5CCD4F5B for ; Fri, 22 Sep 2023 11:28:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233637AbjIVL3C (ORCPT ); Fri, 22 Sep 2023 07:29:02 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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