Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2007042pxu; Sun, 6 Dec 2020 15:31:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4tgXWYc5314FSIqpLbDZlfCDvFgZ5V0Ba0r6fSO/4sVkZ1mrVYDKA/9EO3f6k+CADWYrg X-Received: by 2002:a17:906:814a:: with SMTP id z10mr16199972ejw.96.1607297483032; Sun, 06 Dec 2020 15:31:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607297483; cv=none; d=google.com; s=arc-20160816; b=mmX9AGOj39wHZl2hcKtFF1Lg8F9oo7iV026AhBoklfwERsn1K5GCpMO+zYq+GoNBnR mVbq+mwwI0IiRfzK0frrZacZzaaPPiP8jatbtLgZu1yPm2dLhtARtqE9dL0GVyp2pMCt jnG4qVrgNKkFV9WjRAahG/3Gxiu6lW09RHsbYfJZNbIL3UxfutiRzAMsFAnbObpDYjTU gQYIbjQwC84DdMEzOw5kz+1eMEvFP8fcRGUmaF0cEmgX8v8Ci23/jSRXKqpdQDs+OGFe JoqP5Ij0wmc4wE+3Ky9VC4BPvjvm7dGBkWtm6gQLs+gfwAZDX3ElMhGj5z3+hRJqjr2E 7ZwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qrm+4ZKWOsKZ/Gabbvdu+1GZWGD6E7h/REZlQOG1h2Y=; b=HG9pEoZRawakJFFpS6/0YRmEz7pFcdfobAHJ1oibvJCLfd0RkUjoyXyF5/+24zk5P6 uYenSr79IRAqvGxl0egbfHQ30HSYitfAl7EF/2YF+Z2UwHJhC1cYdI6iq/3/ScISbrcC lMzMnWGzxUu6YITp4FsXhhzvoJ72Vtqvf0jBp6M22IaEi+cQPOSc6TS10W1Bp0QmBhxq b6gSxs0mWCE+izsb/OI+glZiz1LeI46Aa3tGr/F3RoRGkV+V/gLUjQ6VXLst7JAWMCLm iiC7KmVaqdUf0uh5uaPFi6T04DBR1+b3QUspmKmEElyR1yw1JjeEIWiOhTR1e8W62VH1 cBKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kudzu-us.20150623.gappssmtp.com header.s=20150623 header.b=ySNThDEm; 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 d11si5369770eje.298.2020.12.06.15.30.42; Sun, 06 Dec 2020 15:31:23 -0800 (PST) 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; dkim=pass header.i=@kudzu-us.20150623.gappssmtp.com header.s=20150623 header.b=ySNThDEm; 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 S1728051AbgLFX01 (ORCPT + 99 others); Sun, 6 Dec 2020 18:26:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbgLFX01 (ORCPT ); Sun, 6 Dec 2020 18:26:27 -0500 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1739AC0613D0 for ; Sun, 6 Dec 2020 15:25:47 -0800 (PST) Received: by mail-qk1-x742.google.com with SMTP id c7so2785391qke.1 for ; Sun, 06 Dec 2020 15:25:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kudzu-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qrm+4ZKWOsKZ/Gabbvdu+1GZWGD6E7h/REZlQOG1h2Y=; b=ySNThDEmDnkrKwY36pBezSeFTzHP8FIBNIRFI1/MlumxnSy7xHQ18vofPm3zcAdiZ4 GQTwly7KYHGPP5LZJk+cWxVJXgYelWEheAnCBCrKTYjPR8zZrrW+pxdeVcq9WYyvDjII iVmrqWTQpfpB4ssUZ1AgAjRp6cSEyRYs5s6RluDDBInJ2nCQiwXR/bVLGGUcsLGIoAOc zmxzc94T6AgrlUsNkdWeRKJEfv/tim+I1GzGS0e3LrQX1hmNmSzeK6jxSq4+x1hBfNsr hsLKql/Th4dUp79EZpUdL+KlQ/3FMQoRb/Jelc6YVuKijZ5B8r35Y4Zf58lsHOk2WX6y QP4w== 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=qrm+4ZKWOsKZ/Gabbvdu+1GZWGD6E7h/REZlQOG1h2Y=; b=diGgyQZ8ZHK0J0rVjU3V23PaavIOHkMYfC/qfmfXnaueqYU9lwGZcuCLUoih/EomS9 0eOHVyfp1Uqgev44dZ1dFQRPPLG+nbOx20UVEliJbjmRaWfonnhgPfFMO0qSkPyyp18u qVPVCkWfjN6zaHIjAyLen1WZnIpbR5bAOWE7DDUan+SPBKJceVhw5blxLb/sp0z8Jz1l cjS5gEq0P8BxIrkusxCoUJnsSoGS8rgK1PXX9HQ/7MzceDfbBtW7svuKtksEPMywDNrn FZTcSH2AYJ3ZkCGbCs4JWKeaL9MmhiPkoNgbIaY0VkWLg/joPyG0KsqyVne/IwmmH8tY uxgg== X-Gm-Message-State: AOAM531nJsjaC6QBeP8OFNvpwHKdicbbG98+zfVX7o22Wyk34wD5qY47 MYDnhVKMFa4yGh/n1QsvI/uwdQ== X-Received: by 2002:a37:af06:: with SMTP id y6mr21639192qke.305.1607297146382; Sun, 06 Dec 2020 15:25:46 -0800 (PST) Received: from kudzu.us ([2605:a601:a606:1b00:2919:5287:92b6:26db]) by smtp.gmail.com with ESMTPSA id 9sm10006501qty.30.2020.12.06.15.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2020 15:25:46 -0800 (PST) Date: Sun, 6 Dec 2020 18:25:44 -0500 From: Jon Mason To: Serge Semin Cc: Wang Qing , Dave Jiang , Allen Hubbe , linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ntb: idt: fix error check in ntb_hw_idt.c Message-ID: <20201206232544.GB11795@kudzu.us> References: <1604655811-31933-1-git-send-email-wangqing@vivo.com> <20201110183340.77xcobfsnz43vsa2@mobilestation> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201110183340.77xcobfsnz43vsa2@mobilestation> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 10, 2020 at 09:33:40PM +0300, Serge Semin wrote: > Hello Wang > > On Fri, Nov 06, 2020 at 05:43:31PM +0800, Wang Qing wrote: > > idt_create_dev never return NULL and fix smatch warning. > > Thanks for submitting this. For the both changes > Acked-by: Serge Semin Applied to the ntb branch. Thanks, Jon > > They are mostly unrelated though. If they weren't trivial I'd have > suggested to split them up into the dedicated patches. Since they > aren't I suppose leaving the patch 'as is' is ok, unless the subsystem > maintainer thinks differently. > > -Sergey > > > > > Signed-off-by: Wang Qing > > --- > > drivers/ntb/hw/idt/ntb_hw_idt.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c > > index d54261f..e7a4c2a > > --- a/drivers/ntb/hw/idt/ntb_hw_idt.c > > +++ b/drivers/ntb/hw/idt/ntb_hw_idt.c > > @@ -2511,7 +2511,7 @@ static int idt_init_dbgfs(struct idt_ntb_dev *ndev) > > /* If the top directory is not created then do nothing */ > > if (IS_ERR_OR_NULL(dbgfs_topdir)) { > > dev_info(&ndev->ntb.pdev->dev, "Top DebugFS directory absent"); > > - return PTR_ERR(dbgfs_topdir); > > + return PTR_ERR_OR_ZERO(dbgfs_topdir); > > } > > > > /* Create the info file node */ > > @@ -2756,7 +2756,7 @@ static int idt_pci_probe(struct pci_dev *pdev, > > > > /* Allocate the memory for IDT NTB device data */ > > ndev = idt_create_dev(pdev, id); > > - if (IS_ERR_OR_NULL(ndev)) > > + if (IS_ERR(ndev)) > > return PTR_ERR(ndev); > > > > /* Initialize the basic PCI subsystem of the device */ > > -- > > 2.7.4 > >