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 BAF91C6FA82 for ; Fri, 23 Sep 2022 04:55:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbiIWEzM (ORCPT ); Fri, 23 Sep 2022 00:55:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbiIWEzM (ORCPT ); Fri, 23 Sep 2022 00:55:12 -0400 Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5f64:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E1AED58AF for ; Thu, 22 Sep 2022 21:55:11 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 7034B30003C74; Fri, 23 Sep 2022 06:55:07 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 56AEA4F1BA; Fri, 23 Sep 2022 06:55:07 +0200 (CEST) Date: Fri, 23 Sep 2022 06:55:07 +0200 From: Lukas Wunner To: Yang Yingliang Cc: linux-spi@vger.kernel.org, broonie@kernel.org Subject: Re: [PATCH -next 1/6] spi: oc-tiny: Switch to use devm_spi_alloc_master() Message-ID: <20220923045507.GA5066@wunner.de> References: <20220920134819.2981033-1-yangyingliang@huawei.com> <20220920134819.2981033-2-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220920134819.2981033-2-yangyingliang@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On Tue, Sep 20, 2022 at 09:48:14PM +0800, Yang Yingliang wrote: > Switch to use devm_spi_alloc_master() to simpify error path. That's not sufficient. You also need to remove the call to spi_master_put() from tiny_spi_remove(), lest you introduce a use-after-free. Thanks, Lukas