Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1082898imm; Fri, 14 Sep 2018 10:53:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYo4uuXUBHO/64H5wGYeBG+o9ypmMWZdOVpoyGSyuzdSfga41OV5pmWnLvQqnmci9D71ntM X-Received: by 2002:a63:e14a:: with SMTP id h10-v6mr12789894pgk.358.1536947614587; Fri, 14 Sep 2018 10:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536947614; cv=none; d=google.com; s=arc-20160816; b=0rZ8c8vq85mdxTvWx0iyLR1WSCybrCc6B1OmTPp+ZCwQpRTnI+TTcvA2RFjVVlu3Wc wdOG6FkspQdEcevR8a4OkIzoPywUq193UhpZN9yyT5uk75XOlb+q1YMiPFIgQfRIJBHo wJBXbOnUXKobMhb40PcAeP7oshCuzxpZiu85mc84s9fD18v1nz682AzLgQ57wBFUrp7p ScbsyGT3oAqa5M8aRQMfthO5POTWp69wIbc92SFJr8OV2JfHXzwZKS1l7Psq0O+IaxhR /6TMX8nSOhHRDgXl84uTxJ14AK+YlbskVj5qbkRIe95XAM0RZOLnl8d8lvk7BqQ928ud U1KQ== 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=0nQ1+RxJj2aaz++1HtmtUr5nhay5haw9dYt4E1Jxiw8=; b=X6M2QjDIL7VzMkZ/i0cCLpB9IqFN5VdMVCOQjRGGBPj2P/6Ue9Xub72iNMgdvmzPzW b8L6YXKU4Z1qCaLIXKOWkASpbsjHDyTJGVIODqJXWCzQppTm2h3240fQZLVC//OIV/IV HIX7fO0/Ubi5BK0zFsBJiC8kmiB6j2IUq29hwDCR3B9mn775HtcMZPJuyqwkofsDICTQ El3ISac98ciTPhPAUg7Kw49SeW8YFl7jA/+7/Mkv29HlhwGZjJnIM9rPmm82yR1cxo+q CCOwhtEHy1mMiZXx9UpKdAQf13xiSVJEaiFKGvQQWNn6ldjT+z46BM3f7yv5Ar3OnH/W PDmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=A1MjaA4V; 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 m37-v6si7555985pla.236.2018.09.14.10.53.19; Fri, 14 Sep 2018 10:53: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=A1MjaA4V; 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 S1728425AbeINXIO (ORCPT + 99 others); Fri, 14 Sep 2018 19:08:14 -0400 Received: from mail-pf1-f201.google.com ([209.85.210.201]:41238 "EHLO mail-pf1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbeINXIN (ORCPT ); Fri, 14 Sep 2018 19:08:13 -0400 Received: by mail-pf1-f201.google.com with SMTP id u13-v6so4968154pfm.8 for ; Fri, 14 Sep 2018 10:52:40 -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=0nQ1+RxJj2aaz++1HtmtUr5nhay5haw9dYt4E1Jxiw8=; b=A1MjaA4VzKBW6M11SoksNL7AjZk0/pvr9kW/j+d4US+gtfSJGAYrBTSUjll4UjPSWt ZBAL6DaYtG5bVbgiV0bDqRJdRDJ5Xavir2VECJYDsnUMxxnjidZjGp/DEv+EBXD17bXz gjDHUPHfce84SWeA9Si1nPmoDtFj8fLYp3rw/ojHGCUxRQnx+66ZalZOO1iA8QwxM7dn p3a5vdiFI16jk13EMyZQ/wM+e08ZfXc3ChhznHtug/02NJeqEatYhaqaOIjwDpWwu7y+ ynNXELtnfSjIU1oFT7VcX951jtmfSrHo321KxCZy6z+DNZQAKIrsBe6qcb8KCl/2mlAw a/VQ== 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=0nQ1+RxJj2aaz++1HtmtUr5nhay5haw9dYt4E1Jxiw8=; b=i63wN/XwEGJdBFaLA6hQN4Y+E9UvDxDUR1/tGO66+hAYGHpc0k8XLPaLGduQcGSuq/ mr9cJA5kbI8bdshQWV+FHvLzAF6+jA4a6OolQXQgp0ZbmSA3oX+IwO2BjljpvrZ4aSet MXw8vthMsf+iife8hW0NQEyFLNf8WmjJAH2WQOr6UN3YDb4wVNPHcrf5QuizMcToiLQ0 SiJ1UTTMACfZmrqDPDrRY/8cmEXfvtJ6w/7srS2iZdZdCGrsfRnmnXdpHRb0KfoPVh5b bzdBoBOQ3/opXEPn2mbqZLSkrcwCLP+fBcCwU/Hi1jHMww556rvI+w6aIDhiAFFtuInk 0/qQ== X-Gm-Message-State: APzg51Cqd9TF1iH0JgKnGSQ2P5Msw+zOkXX2HHjHTvI37xXg1pKG9Yw/ aPbLHmCghr5QvPmAGJfyf+BCcSdQ X-Received: by 2002:a63:103:: with SMTP id 3-v6mr741917pgb.52.1536947560209; Fri, 14 Sep 2018 10:52:40 -0700 (PDT) Date: Fri, 14 Sep 2018 10:51:13 -0700 In-Reply-To: <20180914175122.21036-1-rkir@google.com> Message-Id: <20180914175122.21036-12-rkir@google.com> Mime-Version: 1.0 References: <20180914175122.21036-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.397.gdd90340f6a-goog Subject: [PATCH 12/21] platform: goldfish: pipe: Return status from "deinit" since "remove" does not do much From: rkir@google.com To: gregkh@linuxfoundation.org Cc: tkjos@google.com, linux-kernel@vger.kernel.org, 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_v2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/platform/goldfish/goldfish_pipe_v2.c b/drivers/platform/goldfish/goldfish_pipe_v2.c index ccde28abcb24..7187b2e603d4 100644 --- a/drivers/platform/goldfish/goldfish_pipe_v2.c +++ b/drivers/platform/goldfish/goldfish_pipe_v2.c @@ -1193,13 +1193,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) @@ -1245,8 +1247,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.397.gdd90340f6a-goog