Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2626646pxk; Mon, 14 Sep 2020 20:06:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqTApoGIcVHZiyNmE3O9J0J2r2GTbh8aupSTiWVWheEYPzcVcOukuDeXYmTvylKCTTsoBg X-Received: by 2002:a17:906:7e42:: with SMTP id z2mr17452555ejr.206.1600139172375; Mon, 14 Sep 2020 20:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600139172; cv=none; d=google.com; s=arc-20160816; b=nC9q1isMFrQKivU3iUBD/ic+VAOSV/VCJQ3YYW9LKnkPx88gZJrxT6365wmE13zTpY bmysyfNtrP0LQH85VKQMwxVgf0/lFEzPoMpeG3hLXlOH9nk83VbOB1h8IZKn+zBvJ4J1 EaPasjFHwmvQKRxyO3RzaNG4UceD9mLLPsgdIBpkfwGyBSlXl0EhLOOL9HTKymo4SKuH kFda+ErTJop74Uw75GjUYc1C3feMbl4Y8LfHZuPA+2j5WpL220qykYT+WisDj4vCVLYq 3rLuhDCaezjXoPTErRigZ2AYTMlO3lX2Q5C7N9AZs+quhdwBJvnSiKJxHeah8ULCJCUf OARQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vzwGzO5d70pZwKTtLSuv5IyEhQ8WwsbE28xAmqL7t0E=; b=mFU9LiNbwx+bhCugJax55GaXXmVKg05C0FVMgrpBIPUWo84aPuCPQoovZVfJbuiZF9 ToM8AHjfanFK3sNUs+pVBNSwd2tlN8/V6ucT3I/t4UrkRY3QGIxeN82us2pd1DHhmS8O UXCVOWt8Mbn2UdA/m2b/R1Z6S+9TnYuvxTqcavagmCiFrwzLvwZS5Xwu/0GavqGmkkQ3 kTsyG1ODNJ1kpCHfyvM34lGZSBFqE3iO0/a6Zx/jRmVj4C9roNVAot2YEFmlEa4M2kkL quAnCECdzKrWctVpOa9tMvAE02NvS2CI6N0xwHwxeitLh98OTHCXs9Tiv1BnTMOj+hHY /Q4A== 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 os2si2651304ejb.112.2020.09.14.20.05.50; Mon, 14 Sep 2020 20:06:12 -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 S1726061AbgIODEN (ORCPT + 99 others); Mon, 14 Sep 2020 23:04:13 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:41340 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726089AbgIODD7 (ORCPT ); Mon, 14 Sep 2020 23:03:59 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 895B6863343CCAEE14C4; Tue, 15 Sep 2020 11:03:56 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Tue, 15 Sep 2020 11:03:48 +0800 From: Liu Shixin To: Dmitry Torokhov CC: , , Liu Shixin Subject: [PATCH -next] Input: da9034-ts - simplify the return expression of da9034_touch_probe() Date: Tue, 15 Sep 2020 11:26:26 +0800 Message-ID: <20200915032626.1772465-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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/input/touchscreen/da9034-ts.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/da9034-ts.c b/drivers/input/touchscreen/da9034-ts.c index 2943f6a58388..dfb2604381d2 100644 --- a/drivers/input/touchscreen/da9034-ts.c +++ b/drivers/input/touchscreen/da9034-ts.c @@ -298,7 +298,6 @@ static int da9034_touch_probe(struct platform_device *pdev) struct da9034_touch_pdata *pdata = dev_get_platdata(&pdev->dev); struct da9034_touch *touch; struct input_dev *input_dev; - int error; touch = devm_kzalloc(&pdev->dev, sizeof(struct da9034_touch), GFP_KERNEL); @@ -344,11 +343,7 @@ static int da9034_touch_probe(struct platform_device *pdev) touch->input_dev = input_dev; input_set_drvdata(input_dev, touch); - error = input_register_device(input_dev); - if (error) - return error; - - return 0; + return input_register_device(input_dev); } static struct platform_driver da9034_touch_driver = { -- 2.25.1