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 D81C3CE79D7 for ; Wed, 20 Sep 2023 14:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234995AbjITOZD (ORCPT ); Wed, 20 Sep 2023 10:25:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235175AbjITOZC (ORCPT ); Wed, 20 Sep 2023 10:25:02 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E84B1E0 for ; Wed, 20 Sep 2023 07:24:56 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 38K3qoLO031049; Wed, 20 Sep 2023 09:24:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s= PODMain02222019; bh=IuU+8mpAoT4DfKp4Dqd5dq43fkewZGqcZzjNNpJ50yw=; b= QpVertl6zKO3jNGOFiGa/4Td06cp51m3AxuCp2zpQSsNcmGH8sPQuEsYcMdpSb7A PrTze4f99TXVGUPeSpc5mRYeHzfxumi8qQMMvcihBnoyQSyZkvLvvsQ6jdgFkOHJ SE1CbAoJPqfgotY9MXXQ/mW5ty6taPiJDEG+m/EuW8Y70cpFcfFKejOsLYpSbzPc +jPj49IPBqIjY8+iu8kBuzHLEKb8hl+uswaQGU2iR+84dPQfkNizjnHyaAGq1hXb UIa7zGmToKI/Ym+Vm3b9MYVS+C/CKJ87VReIzRig2C84OQUho08PQIijXg7df7N+ C+a3JpoYDW7O1VrfTqvokw== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3t59ry5jrb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Sep 2023 09:24:38 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.37; Wed, 20 Sep 2023 15:24:36 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Wed, 20 Sep 2023 15:24:36 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 91FBE3563; Wed, 20 Sep 2023 14:24:36 +0000 (UTC) Date: Wed, 20 Sep 2023 14:24:36 +0000 From: Charles Keepax To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= CC: Dmitry Torokhov , Linus Walleij , Jonathan Cameron , , , Subject: Re: [PATCH 52/52] input: wm97xx-core - Convert to platform remove callback returning void Message-ID: <20230920142436.GJ103419@ediswmail.ad.cirrus.com> References: <20230920125829.1478827-1-u.kleine-koenig@pengutronix.de> <20230920125829.1478827-53-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230920125829.1478827-53-u.kleine-koenig@pengutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: uhoFxa04hK7cTOv2PzC0t8fZL0G58uu_ X-Proofpoint-ORIG-GUID: uhoFxa04hK7cTOv2PzC0t8fZL0G58uu_ X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Wed, Sep 20, 2023 at 02:58:29PM +0200, Uwe Kleine-König wrote: > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is ignored (apart > from emitting a warning) and this typically results in resource leaks. > To improve here there is a quest to make the remove callback return > void. In the first step of this quest all drivers are converted to > .remove_new() which already returns void. Eventually after all drivers > are converted, .remove_new() will be renamed to .remove(). > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Signed-off-by: Uwe Kleine-König > --- Acked-by: Charles Keepax Thanks, Charles