Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1852919imm; Tue, 2 Oct 2018 15:21:35 -0700 (PDT) X-Google-Smtp-Source: ACcGV617BcJoYWiBqwMRJPZYaYjLXan0fp3E90ovbxdxjnD0TVWqrLwoppov7YW/HU6UnElbJW2V X-Received: by 2002:a63:b08:: with SMTP id 8-v6mr1969243pgl.130.1538518895029; Tue, 02 Oct 2018 15:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538518895; cv=none; d=google.com; s=arc-20160816; b=JaIDbuMCIlZ8oM/QR1oBlub7nVc0JOM92rupExy9ZldKLo94TB8PR9IzHOvSWl1w/m uX8DbTD+dk34KDdaQqMuR8rYs9IVJZc7LQPOHgKdrHpodbQkE5aeg5J6s8UbX7YuugdM mlleHz52EKULUIucDNTa++AFCBnMKnVKgsfTn1Uk+zMaQHfmGiLLaTpRO/QsCQf5KIus VeICqW6QOazXlUetiEF3IpCA23cfMIVhp8VBEahQimMw+KcXFsIsd02JaXiyFEIfET1h T2n2rKnfxdiEOnvWoYLvuQai7BzSTCCZDKXquqmME/Ky/vx5r46ItQR/8nn+bSm8qkKh sEzA== 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=OYGxSWYkP0x67f8I7ZIiexPSFvIcqqV/bUGJNvwKWnw=; b=afh8lpWzDyt8LPVnmGk6D4KzwDX3QXniDIy1TPx+cB5OAuHgLF/q1nd23n/nmvvJnS xrIHUsmy8dzCJsS56bY6KJjzk/56F5X8pPQo1Q8KDQ+xuhTGdb0A15DVIeNrdGVtrKNU l3PnaRegmJc0rmBvpfIRqxMKAt4LisZa/zJs+594fwJ4MdQ9tWjm8VFodPZtvt5ib/R1 JdULXjoZEahHKoLqQy+uQNNVTbtxrfJYJBeV/ZRbsUx386ec7YAHxRnaxhwJEdZvkNMA UBd+b28KzXo7LWOYjzCzmXeGAz3RnrMVSt0LsGjHIxeCi6jxYewzI7jRwR/PQU4ywjWm FiRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DRcADOym; 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 c14-v6si1915798pgm.556.2018.10.02.15.21.19; Tue, 02 Oct 2018 15:21:34 -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=DRcADOym; 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 S1727837AbeJCFGF (ORCPT + 99 others); Wed, 3 Oct 2018 01:06:05 -0400 Received: from mail-vk1-f201.google.com ([209.85.221.201]:47591 "EHLO mail-vk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725198AbeJCFGE (ORCPT ); Wed, 3 Oct 2018 01:06:04 -0400 Received: by mail-vk1-f201.google.com with SMTP id v4-v6so853837vkd.14 for ; Tue, 02 Oct 2018 15:20:30 -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=OYGxSWYkP0x67f8I7ZIiexPSFvIcqqV/bUGJNvwKWnw=; b=DRcADOymJXhP5SKMpj9uoaA5qZDEgla/++W6lXcbbz02CgJxu3KmhfKudoEodjw364 UElBVc7z1L79YOpszMGUKVLQ3h8QwAsRfTJJJQinZBWjn/KiFSkSq/+igdzv3k2d3Pt8 d2x2yRqwb9TmOPO2TrOuMGRQ9TFgJZ6uwDeePK3zaO0CoSSVAl4v1uEgbulfGSwg/2Ji 8pdnu9VdEDSoSqZd5WDOopoxLYiSHGw6lAdhHWNMvwrJ6790jH4rywy4xKqBNgXb7Ie3 WfFreV4+2E2Y1EO476kL/TZjc0oqyi5elJfJ5rE9XnTqQaJcZKtWaHORPO8OCYS6Ps/F 0FDQ== 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=OYGxSWYkP0x67f8I7ZIiexPSFvIcqqV/bUGJNvwKWnw=; b=O5XzMTrmJIYzvh7bqTk5JF/adf/7gAsK/Ppsawk/OqPmRx+R5qqDKksLGsB7G0Fyos Np5fdIwYHRGu56JvWNJeaBfuFqo5w1RFlaFqPgk/7OFzAzWRHVa8iATr8hMvvFcFplHw 3+i1xlse6ESUclCgC9R3+5lVZy/yG+Ut7HcyMyejVROq2M5bS+LZUfbpGiYnnd9qqOng mN3SnUhsbOWF8HKuMBxoRNKhuCjdROdgmoxsBRUfXo7T5jxqKl3YmaaU4gpftdSD5qFA oI9I386XRlBdILK7do1m9m6q0ws0MLd4LZ0e7SsuAy6EhDiVrUI0SDr4qdvnfkS+8V3T sDYg== X-Gm-Message-State: ABuFfoiWiZrP9gPIrG9QtC8Gd9INVMMcLfpzMyLSq97a3cqeaCnHCpYO WGZeyiw/ZMKVVuZANdWBzlTDMC4s X-Received: by 2002:a9f:3766:: with SMTP id a35-v6mr17445092uae.19.1538518830052; Tue, 02 Oct 2018 15:20:30 -0700 (PDT) Date: Tue, 2 Oct 2018 15:18:55 -0700 In-Reply-To: <20181002221903.19476-1-rkir@google.com> Message-Id: <20181002221903.19476-7-rkir@google.com> Mime-Version: 1.0 References: <20181002221903.19476-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog Subject: [PATCH 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 --- 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