Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2865892imm; Wed, 3 Oct 2018 10:18:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV610opG//B0isJBHnelUUkLqwTYVd/I5/NfuisoxPk3mZHbwWxAOgbnEVUHW3mfAdRxd19j/ X-Received: by 2002:a63:31c8:: with SMTP id x191-v6mr2163637pgx.229.1538587130013; Wed, 03 Oct 2018 10:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538587129; cv=none; d=google.com; s=arc-20160816; b=aoRGQSf6Sdlvagie6Dh6NSnR5qM2+dR6O5FPz8rJck30LVYf7UN/A1Yje0oLKvTNUC hNKg7zA1VCy+rAU2MmJsDl5n6Kfm0Q7n56ZUE5nei22JiwjomVMhSu8VClN4M6nTd5kl Rr0C0KRPxOVWVjlC5Li1yscQMAQ+ZxLimwNLs6ywo/zf1UH4uhd00NhwCzT+Sseh7yO2 2BwdtwITaNLOBdXAejECnCQ3fkWn3KxyR+9qZMa/YPE4ZkxITPUjcSk1Wh26TzYlXBtQ jtzi+389XSindL4AK0KPAG4Vmk2PPkzYag6rBpGx9zEdrNPmsXwGAyh0Lt2wMPC+8VDR HBHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=kCzQhdQumjnoOCHQSFSh0FZe4DkfX7jadMesum4jW4A=; b=LiH4VcN7yHQawdHPytvEci420YCmGVk2uHUkjht5/b3APm47a9Aq7TF0r2g+/XiQHg YA7IEdCcawDVYCei27z8FM1FPAaw9AH+d4oW4+H6QuMrOXf/1d/7D8KmUBtVdKg0F/+2 Iwq1Z9AUCxRjh7KXiW7qoxIq4C/L6bxMW9FlLzTPAsHguUYn0wIlcinO+KH5SzHPqOsD EChg0VSWNA9aMFXZzHUUXYX5ow2FFacn4YU0k4D2gMZBoa81ZhcdiUIAgUhkaXg8+pNj oChodFaKpisUiblgDOGwTe8k6YejLERCeSj+LRmovQw0x3S51J+GvHZ03bWKo5L6F3+d OAuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=olIY4SGy; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 20-v6si2043852pfk.287.2018.10.03.10.18.34; Wed, 03 Oct 2018 10:18:49 -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=@google.com header.s=20161025 header.b=olIY4SGy; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727471AbeJDAHY (ORCPT + 99 others); Wed, 3 Oct 2018 20:07:24 -0400 Received: from mail-io1-f74.google.com ([209.85.166.74]:43993 "EHLO mail-io1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726842AbeJDAHX (ORCPT ); Wed, 3 Oct 2018 20:07:23 -0400 Received: by mail-io1-f74.google.com with SMTP id w19-v6so6122482ioa.10 for ; Wed, 03 Oct 2018 10:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=kCzQhdQumjnoOCHQSFSh0FZe4DkfX7jadMesum4jW4A=; b=olIY4SGyXFC6hU28p7eVciyws6sHK22rLNNyrOH9D41XjsaIP1W57WbC2wLiFp1D1D /6+ySnMfY+jHBbuV4bOKYf6m8ak9reOsHCvdYeyv0ptoKowp/ORkdsCEUtI4yXJ8ZnLM RfMMBs4GsuIdBk6/Gqhv5Zhcbu1IcH/++wKPgBnfpoobAeq2hPsyZzmQjXMzuun8fdCN QH6YfbPOC/77zcXmUFN7/u0lMheuMr18wL0kzYDrfuxdInhFs07Cn6Au0IKXwYqo9bSV /sZey32zc3zlAWfO80f1x9zmFq82PEGlf4yYM5SBBv3MLz8BlvEiSLMOgSDGz66AF0Kt 3v1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=kCzQhdQumjnoOCHQSFSh0FZe4DkfX7jadMesum4jW4A=; b=lpflw7zb4BFDW7y2GrKIcVBRCuI87vnr4YvRxL10GZBexk7pTa1GwM19QyjSMlxT0b 3epRy+GH6Ekb/bDlEkSEkPeoj9VbcfiCP8eCsT/BysAsCW7wAzkLjcmTSd/D9OGN9D4R OQ31LlslrEYbGBH7sYwm+0ZSDom6YWLXzixjoLfmxPj6KXao0+2AVN6PpB190LbNLgG6 GkjlgilVyn9tmbO9wXvwDVjztZUjfFoTz9kobKtbx0W26JzJgEcfOZ/5Va/yPwOd89hn uqCSpTLOeptmDDIA8uDhsgRNzeyjNu8IKO3n6tqH3Yrav+XlDF146SVwWM5pB1TpOva7 o1GQ== X-Gm-Message-State: ABuFfojR7yQWyaQxYA8GYKwti95fsDP7LXT6wO/8YPqpX8qqNTErfrlh l7Vcq29qKANmwgMPwgcl/4PnB4V8 X-Received: by 2002:a24:8082:: with SMTP id g124-v6mr2030174itd.12.1538587085241; Wed, 03 Oct 2018 10:18:05 -0700 (PDT) Date: Wed, 3 Oct 2018 10:17:12 -0700 In-Reply-To: <20181003171720.169953-1-rkir@google.com> Message-Id: <20181003171720.169953-7-rkir@google.com> Mime-Version: 1.0 References: <20181003171720.169953-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog Subject: [PATCH v3 07/15] platform: goldfish: pipe: Return status from "deinit" since "remove" does not do much From: rkir@google.com To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, tkjos@google.com, Roman Kiryanov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } static int goldfish_pipe_probe(struct platform_device *pdev) @@ -941,8 +943,7 @@ static int goldfish_pipe_remove(struct platform_device *pdev) { struct goldfish_pipe_dev *dev = platform_get_drvdata(pdev); - goldfish_pipe_device_deinit(pdev, dev); - return 0; + return goldfish_pipe_device_deinit(pdev, dev); } static const struct acpi_device_id goldfish_pipe_acpi_match[] = { -- 2.19.0.605.g01d371f741-goog