Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp262888pxb; Thu, 2 Sep 2021 03:42:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3Y0SKsQmj2sbd5cBNPbmTWe9UoBBM8EAckVGYc5/busf81eqS4mim/j6DtfxJkq5+isvG X-Received: by 2002:a17:906:350d:: with SMTP id r13mr3148395eja.408.1630579373954; Thu, 02 Sep 2021 03:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630579373; cv=none; d=google.com; s=arc-20160816; b=mF6hK+UgCD1WzTRJXcAWtRywqSsyq0j3NERiMjjruG3jiPeZioyAzba94nXw2MYEM6 t9/6fVjucWFoak/y0GxK8G5WdN0H/n0YhYYiofQQcYsJ4zmLIDI/Hpuj1B4UBTf+H5Wf qknC91lfhqDW15G3UAm/PxbXrCUWRTW4LzbODiyyzlB0HFgVq38qoXU6QeHuyGOkj4de j4QWkoUn94/tjFNMt/GDSXNVCnNJaN3+h6M8W970jQ3WrryQ3j/pKCTw3u2RxQ5KLAPu krhZcf6b2YufAneHVa4QksxOK5Bu5iZdjvcikykOxhklp6emKk7KiQvxS1QwtVUq+bTj ZKDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=j/RLpDa/HGaWQruo5AV1AyP1DrsjozjJr94nsucregA=; b=L0vOKtdk+ZaUpLwYVK5LiCn4PpjNlGRDThACrswtP9z6Axi38aMgj1gsylMDQcCSCP 0G7pj4yHR/oLrptHCNbdnm5t25y6g6ET6aLNAKgynvCZTcm1oVnLKkO48X28cmCj1Py/ MrBdg7dxFkl9FOqa/v+8NDVpB0K1jofGheKcXZ4YcMC2/L/TTuAgimnxVHXE8aWEfhNG rP/bWtQLRmg86UBLoWVteJMx/TQ30Qh+oexxFmRhoTzcbCgyGZV2lMAb2p/ZEYgVsdlQ 86pbidyKs7eK1bqPGAEwstc+6x0SRVMfp63FfkSY1YiEcohhGWp2KcXgd++qZzM7TmUD Ue7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KKk+sNuN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si1641610eda.417.2021.09.02.03.41.50; Thu, 02 Sep 2021 03:42:53 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KKk+sNuN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242667AbhIBKjw (ORCPT + 99 others); Thu, 2 Sep 2021 06:39:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:59922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233714AbhIBKjv (ORCPT ); Thu, 2 Sep 2021 06:39:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EE23060FC0; Thu, 2 Sep 2021 10:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630579133; bh=NMGhKYahMW2rDY0ByMqQVIirb8+NxXtz6C6xR4Zoao0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KKk+sNuNNpYA/AMQ1kXuzG3WjfS1tV91jm/FSuKyK9+q+CrQO0fSpwgHy2ky8bykI zmBJ/H7sBkLXnz9vKKLshLm4JG4/2qqKQSPf4UVJSplga7wwG9cQ86x0CeISVpqpf3 HkfpVBocD6wtOJwn4cR0aH8ZcCBCe5MlTt0+aows= Date: Thu, 2 Sep 2021 12:38:50 +0200 From: Greg KH To: Nirmoy Das Cc: rafael@kernel.org, linux-kernel@vger.kernel.org, Christian.Koenig@amd.com Subject: Re: [PATCH 1/1] debugfs: use IS_ERR to check for error Message-ID: References: <20210902102917.2233-1-nirmoy.das@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210902102917.2233-1-nirmoy.das@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 02, 2021 at 12:29:17PM +0200, Nirmoy Das wrote: > debugfs_create_file() returns encoded error so > use IS_ERR for checking return value. > > References: https://gitlab.freedesktop.org/drm/amd/-/issues/1686 > Signed-off-by: Nirmoy Das > --- > fs/debugfs/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c > index 8129a430d789..2f117c57160d 100644 > --- a/fs/debugfs/inode.c > +++ b/fs/debugfs/inode.c > @@ -528,7 +528,7 @@ void debugfs_create_file_size(const char *name, umode_t mode, > { > struct dentry *de = debugfs_create_file(name, mode, parent, data, fops); > > - if (de) > + if (!IS_ERR(de)) > d_inode(de)->i_size = file_size; > } > EXPORT_SYMBOL_GPL(debugfs_create_file_size); > -- > 2.32.0 > Ah, good catch, I'll queue this up after 5.15-rc1 is out, thanks! greg k-h