Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2953804pxk; Mon, 21 Sep 2020 01:06:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJumG15EZH6R5P0gj3zOgJhcUCLTdTq+3lZ7cUJSvfmmy+4zXZrmIsNUcebJpaNRTbmIwe X-Received: by 2002:a50:a6c2:: with SMTP id f2mr5906779edc.227.1600675591224; Mon, 21 Sep 2020 01:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675591; cv=none; d=google.com; s=arc-20160816; b=fMudhXmokkTISo/HYX2hJ1kjI49IbNNDZZozBUiGnt7XVC9do77bBGksDiYogTDN+u ED8sFSz4sFjOZt9AcmLuYmRswmu5FGtpIWjFuOOI4v6dSc/j414U5FjEWw6jc3/37GzZ 5UbdmQ3V1FtJe+jNyn26WBNXv9SHVWtbDfiWqLFdQkSvFYkpaWfaXCrXtzSX03E2Lzcw KDjzKey99dtSiti0hMhvKvp4ec6v4k2hFJ/dMcQB0z+A6m5AGPVzw0oYXezDlZPyc5ne G/5D1XmNNIDC8yq/wp4+/gG+3Sv4F9P0MJ1pzMjlPsVCqwTKvpdDprYwBnu45sv9Wcm0 biRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=aF676Ahw+gOUXK3tDsGW13yh78jcZFcoOB6QFHG9SOA=; b=onaSHjZ89dcoZ3Rror1o78pUBTzSfevXdWftIpQZeGUoxsLntWoCjc1qb52asIrV6K yMcsQFjL9STBDqyYCFTgraEKV2zbEX5pPaZVNzDFl+9FpxBY/ponmXEJ1SEinUpx2+yM TpSK8QE5zGRftTpVi5O8j2kJKIbIx+dbGTQ17BOQ9Fe6WBfuUq0o7eq8wsZfW0d9izIa Kcw9+WbOUn6RlHRhNwpifW4RIbxEo06vhZfpm1TlmkHuO/Bqz9XL3FKRn4niPdjOH3oV wbsBm7juOy3hwUBLbhwwhdktxIQ5Sa/vCkZbGFsXvCZyz1ARp9UitLhev8YMXqcI6QGR qFbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi26si7895685ejb.361.2020.09.21.01.06.08; Mon, 21 Sep 2020 01:06:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726611AbgIUICT (ORCPT + 99 others); Mon, 21 Sep 2020 04:02:19 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13782 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726236AbgIUICM (ORCPT ); Mon, 21 Sep 2020 04:02:12 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DDEAA75F753DD7AEB02D; Mon, 21 Sep 2020 16:02:09 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:01:59 +0800 From: Liu Shixin To: Greg Kroah-Hartman , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , "Hridya Valsaraju" , Suren Baghdasaryan CC: , , Liu Shixin Subject: [PATCH -next] binder: simplify the return expression of binder_mmap Date: Mon, 21 Sep 2020 16:24:23 +0800 Message-ID: <20200921082423.2590938-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/android/binder.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 37a505c41dec..1f929e0cf39f 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -5204,10 +5204,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma) vma->vm_ops = &binder_vm_ops; vma->vm_private_data = proc; - ret = binder_alloc_mmap_handler(&proc->alloc, vma); - if (ret) - return ret; - return 0; + return binder_alloc_mmap_handler(&proc->alloc, vma); err_bad_arg: pr_err("%s: %d %lx-%lx %s failed %d\n", __func__, -- 2.25.1