Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4259134imm; Mon, 15 Oct 2018 11:38:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Gouc9ZiKx17UsHb9o5I9pRpXSWr+hVf4b/TyG1vOWjmiIXBzWVOMzSxqejaLBogiMCI4I X-Received: by 2002:a63:c746:: with SMTP id v6-v6mr17384529pgg.108.1539628694279; Mon, 15 Oct 2018 11:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539628694; cv=none; d=google.com; s=arc-20160816; b=RD2OS346ce2LE96VigS43EN5RXBEmZYJKrJpNOLouLQPn5xwtEx2Zke4CBhugCVlqO stCqXGTtJ4j77Nse8+Haj+FnC1bnVunb2W6VxT9joV9UrbXlQKwNS2KkE8ssYbiJRDNK gZ+JaUH5OiB3xSAzjAjrwN+6zCO3mcnrBXToS2VooYPGumLMt03enX9b0JcxoPtc3Ii6 DzZzk0O9u3iMcmkXEqEBQGpkNqgRoJlqa2Yg/5/Csz3NXHlUIu9kSPiXrhXxL9omuoMN AdhlW2/+z8974f2GTwRnLYLqERAJxYXo8HMDK8o9YCfEnpfb7CBD9zL2RZZTaRET86ei 9VGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iKsV492jLlvlWo1SRKfYoodrM3339UKwFuY8h477HNU=; b=k+HZujP8fmKulajBHJM8Sg7ADTiRMlSFaNFybP+oSa7paAhA+cARi3G/ZPc4M12gqq qtbE69WQxDirS4BEA+2vjVd4nIAm3ooyShiPu+bCtdsITFzueJTNHCM6hq7tbeK0uHnn eXGjFeOSr3pidBqkbhyybp2jGFsV9foPje73M9f70l/iQPUMrSFZmv+34AH6eAuTeDMM QiK9+PQIeU047PZEWztInzl/TyW/IVS6aI+M+NXW3ZOLCfn20a0IDGD4PQmEcLpnE1Nf XihdyAfhBEW9nud8+5z/jTj4nmoBz2PAivfuP+fl2kdwfko6O0poNb/HgWcBN4auF12e YNcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P8w5vgLx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n84-v6si11282428pfg.127.2018.10.15.11.37.59; Mon, 15 Oct 2018 11:38:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P8w5vgLx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726926AbeJPCWe (ORCPT + 99 others); Mon, 15 Oct 2018 22:22:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:38854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbeJPCWd (ORCPT ); Mon, 15 Oct 2018 22:22:33 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A494020881; Mon, 15 Oct 2018 18:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539628568; bh=W9jTNov0Zydk0CK4fau7/ZXACI/7cGhgJLVwaxMP97Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P8w5vgLxVv7CVJzwmQcYs1EGuO2l4DNjMJs/8EdmexFC5SG3+G5MewUhNsoUoq+75 8MPK0SF2AeavMM9UhVXCUfDUEsDhf7KECytP9aSs1i7kS0kffazyMrSpWaoWH+AICk 1ps2NMx9oUwwsFTWBo1L3+3IXKZC6AwXMPrw75kU= Date: Mon, 15 Oct 2018 20:36:05 +0200 From: Greg KH To: rkir@google.com Cc: linux-kernel@vger.kernel.org, tkjos@google.com Subject: Re: [PATCH v3 07/15] platform: goldfish: pipe: Return status from "deinit" since "remove" does not do much Message-ID: <20181015183605.GB28454@kroah.com> References: <20181003171720.169953-1-rkir@google.com> <20181003171720.169953-7-rkir@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181003171720.169953-7-rkir@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 03, 2018 at 10:17:12AM -0700, rkir@google.com wrote: > From: Roman Kiryanov > > This way deinit will have a chance to report an error. > > Signed-off-by: Roman Kiryanov > --- > Changes in v3: > - No change. > Changes in v2: > - No change. > > drivers/platform/goldfish/goldfish_pipe.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c > index 445c0c0c66c4..1822d4146778 100644 > --- a/drivers/platform/goldfish/goldfish_pipe.c > +++ b/drivers/platform/goldfish/goldfish_pipe.c > @@ -888,13 +888,15 @@ static int goldfish_pipe_device_init(struct platform_device *pdev, > return 0; > } > > -static void goldfish_pipe_device_deinit(struct platform_device *pdev, > - struct goldfish_pipe_dev *dev) > +static int goldfish_pipe_device_deinit(struct platform_device *pdev, > + struct goldfish_pipe_dev *dev) > { > misc_deregister(&dev->miscdev); > tasklet_kill(&dev->irq_tasklet); > kfree(dev->pipes); > free_page((unsigned long)dev->buffers); > + > + return 0; > } This function can not fail, why are you returning 0 always? That doesn't make sense. thanks, greg k-h