From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E73CBC433DF for ; Tue, 28 Jul 2020 12:48:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4A31206D7 for ; Tue, 28 Jul 2020 12:48:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V4D+xk7r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4A31206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xRa4CqUlb3SSwU3io3/0rgdTCFx3eGEE0YCrUb5IpRA=; b=V4D+xk7rEpfa94jy2bUVh7vWR 6vhQhG29n2AR6yGAr6yYYk00wNYvQmigTHOXSJml8XOO/qgEnPkjwOHlF2EXDWx1v2hVAWSv0ow1+ itfb6jeH7mdHHtPd25Lb/m+LXK+HOijXmLHTZgCuJLoRo1dt3ashQGC2Kt6IBG954dufmq4CizgQ6 Z4jLw6YY4b5dMwAKgUIEc7Yci9rAn1UNxNOvLLgqQ3YDRNDlITjoORN7oHbRiQYwGFaNNEQSeJMP6 uvcQg1367hoN71+i/DmtkNK3JP9dOr5WTJu0jBZL5XaI23If8NIOVeZJkdYuE9HKred1/SK4SGCkw TaqqCTPrA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0P0j-0000xo-CA; Tue, 28 Jul 2020 12:47:13 +0000 Received: from mail-ed1-f65.google.com ([209.85.208.65]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0P0g-0000wp-GP for linux-arm-kernel@lists.infradead.org; Tue, 28 Jul 2020 12:47:11 +0000 Received: by mail-ed1-f65.google.com with SMTP id o18so288183eds.10 for ; Tue, 28 Jul 2020 05:47:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=T/pqmbhLh7sKGJACzLPiIlQzkqQ8XjFefTZhyBvXBXA=; b=nCaXZjTNEUYEdpKC4eubBsqaWns8GjVhlx7F/mIjmM1m7lQeFCHeMtOH7DOTtOUtxK mVR4I5QaylgcjLg4fQLINLj3qY7ZT9l7/lChledP6/zjade6lxGnHo8RfFaqwAIquxPF /UtoZ1pr0tbKPcd7qVQ5uWG+ww69sX+lVJP5ODvVzeyUE54mlnMeZi20WGdQzoTSmSBG 7NGKS2XT/jqAGigNDefudKrVdqMTmULQajmzUNPBO+LkWUn/jda3IXbggFKaZdubW6PH 7Er1KB6dpephGIUc9hWJV7mTJvhtli5Z+6fsKA+/ayysw/FaEQcZ/0gxCtBqThCNX3qd yt9A== X-Gm-Message-State: AOAM531ZKiCrcQ/yXC/BolJmJWBtPlxr0pHY9vtZUotU5xovY3666kG7 RdjN61zagMveojk1OP7S4Yc= X-Google-Smtp-Source: ABdhPJxqpRPRTtJr4gwvC8HABlrPkJOd0W1I02Qx/TUd4FrazEXvNoO6XEeihc+npOZ43QoBZUN7zw== X-Received: by 2002:a05:6402:1a54:: with SMTP id bf20mr14060285edb.217.1595940429122; Tue, 28 Jul 2020 05:47:09 -0700 (PDT) Received: from kozik-lap ([194.230.155.213]) by smtp.googlemail.com with ESMTPSA id c7sm8221178ejr.77.2020.07.28.05.47.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jul 2020 05:47:08 -0700 (PDT) Date: Tue, 28 Jul 2020 14:47:06 +0200 From: Krzysztof Kozlowski To: Qinglang Miao Subject: Re: [PATCH -next] ARM: s3c: fix return value check in s3c_usb_otgphy_init() Message-ID: <20200728124706.GA32233@kozik-lap> References: <20200728022756.87687-1-miaoqinglang@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200728022756.87687-1-miaoqinglang@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200728_084710_562415_4903564C X-CRM114-Status: GOOD ( 22.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Greg Kroah-Hartman , Russell King , linux-kernel@vger.kernel.org, Kukjin Kim , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 28, 2020 at 10:27:56AM +0800, Qinglang Miao wrote: > the function clk_get() returns ERR_PTR() in case of error and > never returns NULL. So there's no need to test whether xusbxti > is NULL, just remove the redundant part in the return value check. > > Signed-off-by: Qinglang Miao > --- > arch/arm/mach-s3c64xx/setup-usb-phy.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Looks good, thanks. I don't plan to take anything before merge window (it is quite late in the cycle) so I will apply it after the window. Best regards, Krzysztof > diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c64xx/setup-usb-phy.c > index d6b0e3b26..99d743884 100644 > --- a/arch/arm/mach-s3c64xx/setup-usb-phy.c > +++ b/arch/arm/mach-s3c64xx/setup-usb-phy.c > @@ -31,7 +31,7 @@ static int s3c_usb_otgphy_init(struct platform_device *pdev) > phyclk = readl(S3C_PHYCLK) & ~S3C_PHYCLK_CLKSEL_MASK; > > xusbxti = clk_get(&pdev->dev, "xusbxti"); > - if (xusbxti && !IS_ERR(xusbxti)) { > + if (!IS_ERR(xusbxti)) { > switch (clk_get_rate(xusbxti)) { > case 12 * MHZ: > phyclk |= S3C_PHYCLK_CLKSEL_12M; > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel