Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5315676ybf; Wed, 4 Mar 2020 22:09:56 -0800 (PST) X-Google-Smtp-Source: ADFU+vtg1/oWfIH3ihMfS+RI6SuRVE7OFCfogaHKTxMnBtvoOTJQuCn+zj366qpqdZ3GqczJQtcd X-Received: by 2002:a05:6830:181:: with SMTP id q1mr5253468ota.335.1583388596777; Wed, 04 Mar 2020 22:09:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583388596; cv=none; d=google.com; s=arc-20160816; b=RW3c7h+IlLHmc07wv8x4p5PsvDAvCuByL9pc6tTBCN40zZiJ8U5kJdDxinFcISYrcO WxNewf2HrBqEveX44IYsvHC3KBhR3k8/xkKo/GBSjTgBvWU9wUJX2etD7+Z7bBQMFj6e MVfE0Jkuv+E/UDY5iwd+JHb/2eIxcqMfEJ9KZhLOT1uVeMLMKtbGUqlAO6e6DQZggpkv LmY/98nWtPJTivLsb4W7pgDh9P57IrPhZ/tUXKhiFvO5hENkTTm5sBiRfvdDMiZCJXvV iNAIDik4tMUHCCz7mG3yV8AgrrVNLr6DLLoRsK1l/Lcrjy5hEowXXyD/vBrALzsVJuKH doaw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=1XMM5EVTP7PicRPgb8Ii1NE1PzvNG2lY5fa6mN4YKuE=; b=lTHlq4nGD5p/I9pHOfBnz+05JS8bwgafctWkBGEbKSyNtZSxkGpoaZ84m8byLKQXQK X6eZ/MDGdVUDOcUD3GYLupR/vfs1h8kbmHb5tuWquWDA8SSdyJfPKKbyN2eFoRvQm4ZI 4DR2LRNYIrMf2xt1rblOzopEyA389oCZPuH3ZF45jpnbdzw/lJfhAve/VxQV6/ETy7jD 67sZUAZDT9Zriij5tvga4MnFvKssMC3tSGcKynZkUBztvOOLEJ80lE1OyBnRuv0n2h/a iR9HW4cbOhm2w2i24kHUZA9BOJtnp5ikHxc3stXTy3fyUHBG28S6rq+a3yF+jTRDWZSw iyag== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si2943752oih.186.2020.03.04.22.09.44; Wed, 04 Mar 2020 22:09:56 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725926AbgCEGJW (ORCPT + 99 others); Thu, 5 Mar 2020 01:09:22 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38750 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725839AbgCEGJV (ORCPT ); Thu, 5 Mar 2020 01:09:21 -0500 Received: by mail-wm1-f67.google.com with SMTP id u9so4362220wml.3; Wed, 04 Mar 2020 22:09:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=1XMM5EVTP7PicRPgb8Ii1NE1PzvNG2lY5fa6mN4YKuE=; b=FKa3zeG+7JOZREV47i8TPX/VgP/L5VZTion0YGUJkJi24d2lmNhMLy4wqNwSINhM5b UTVQVlL+vyhWR2fCeuo3RWF0+zxr6PW8dBe+gCwrc/NU2jSPhsrv3NjnriAUPgbj4snI 7nRLa1q46PeJOyWoBOyvIA2bSqVktSIhUVFmw4w0k/odYnrqrAkAY+ePYqvL5mahAv+A 4cEuxC6CpU1CARyQ1NW/17P4UD6RqCSpO7jA1+z+6FKtPdrvn5qBWVneRiPC0UbMG4/0 cvzPWYqeZCiTxoPBw+ckHpBx0oIKk31E8r18Os1ExBsNKZ49yTGK7YYPMszwBvkFeNlH OsvA== X-Gm-Message-State: ANhLgQ0YMyh7TQG+hhffmtZl9Pdt9ZRBJEH0biWMAMuRAhtR0w7PtllU PinZ1O++OT+f4YrfytVj9q1/M3IQP/I= X-Received: by 2002:a1c:4e18:: with SMTP id g24mr7814039wmh.95.1583388557902; Wed, 04 Mar 2020 22:09:17 -0800 (PST) Received: from [192.168.1.49] (185-219-167-24-static.vivo.cz. [185.219.167.24]) by smtp.gmail.com with ESMTPSA id n13sm7832846wmd.21.2020.03.04.22.09.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 22:09:17 -0800 (PST) Subject: Re: [PATCH v2]tty:serial:mvebu-uart:fix a wrong return To: tangbin Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200305013823.20976-1-tangbin@cmss.chinamobile.com> From: Jiri Slaby Autocrypt: addr=jslaby@suse.com; prefer-encrypt=mutual; keydata= mQINBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEkSVz6FoqCHrUTx wr+aw6qqQVgvT/McQtsI0S66uIkQjzPUrgAEtWUv76rM4ekqL9stHyvTGw0Fj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TWxrXdNq/pu0n7hA6Btx7NYjBnnD8 lV8Qlb0lencEUBXNFDmdWussMAlnxjmKhZyb30m1IgjFfG30UloZzUGCyLkr/53JMovAswmC IHNtXHwb58Ikn1i2U049aFso+WtDz4BjnYBqCL1Y2F7pd8l2HmDqm2I4gubffSaRHiBbqcSB lXIjJOrd6Q66u5+1Yv32qk/nOL542syYtFDH2J5wM2AWvfjZH1tMOVvVMu5Fv7+0n3x/9shY ivRypCapDfcWBGGsbX5eaXpRfInaMTGaU7wmWO44Z5diHpmQgTLOrN9/MEtdkK6OVhAMVenI w1UnZnA+ZfaZYShi5oFTQk3vAz7/NaA5/bNHCES4PcDZw7Y/GiIh/JQR8H1JKZ99or9LjFeg HrC8YQ1nzkeDfsLtYM11oC3peHa5AiXLmCuSC9ammQ3LhkfET6N42xTu2A== Message-ID: <369c9e9a-9560-a465-31c8-1b79950b4875@suse.com> Date: Thu, 5 Mar 2020 07:09:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200305013823.20976-1-tangbin@cmss.chinamobile.com> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05. 03. 20, 2:38, tangbin wrote: > in this place, the function should return a > negative value and the PTR_ERR already returns > a negative,so return -PTR_ERR() is wrong. > > Signed-off-by: tangbin Acked-by: Jiri Slaby > --- > drivers/tty/serial/mvebu-uart.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c > index c12a12556..4e9a59071 100644 > --- a/drivers/tty/serial/mvebu-uart.c > +++ b/drivers/tty/serial/mvebu-uart.c > @@ -851,7 +851,7 @@ static int mvebu_uart_probe(struct platform_device *pdev) > > port->membase = devm_ioremap_resource(&pdev->dev, reg); > if (IS_ERR(port->membase)) > - return -PTR_ERR(port->membase); > + return PTR_ERR(port->membase); > > mvuart = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_uart), > GFP_KERNEL); > thanks, -- js suse labs