From: Greg KH <gregkh@linuxfoundation.org>
To: Yi Wang <wang.yi59@zte.com.cn>
Cc: sudeep.dutt@intel.com, ashutosh.dixit@intel.com, arnd@arndb.de,
alexios.zavras@intel.com, tglx@linutronix.de,
allison@lohutok.net, linux-kernel@vger.kernel.org,
xue.zhihong@zte.com.cn, wang.liang82@zte.com.cn,
Liao Pingfang <liao.pingfang@zte.com.cn>
Subject: Re: [PATCH] misc: mic: Replace kmalloc with kzalloc in the error message
Date: Fri, 29 May 2020 07:38:36 +0200 [thread overview]
Message-ID: <20200529053836.GA525659@kroah.com> (raw)
In-Reply-To: <1590714081-15574-1-git-send-email-wang.yi59@zte.com.cn>
On Fri, May 29, 2020 at 09:01:21AM +0800, Yi Wang wrote:
> From: Liao Pingfang <liao.pingfang@zte.com.cn>
>
> Use kzalloc instead of kmalloc in the error message according to
> the previous kzalloc() call.
>
> Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
> ---
> drivers/misc/mic/host/mic_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/mic/host/mic_main.c b/drivers/misc/mic/host/mic_main.c
> index be0784f..8296f31 100644
> --- a/drivers/misc/mic/host/mic_main.c
> +++ b/drivers/misc/mic/host/mic_main.c
> @@ -164,7 +164,7 @@ static int mic_probe(struct pci_dev *pdev,
> mdev = kzalloc(sizeof(*mdev), GFP_KERNEL);
> if (!mdev) {
> rc = -ENOMEM;
> - dev_err(&pdev->dev, "mdev kmalloc failed rc %d\n", rc);
> + dev_err(&pdev->dev, "mdev kzalloc failed rc %d\n", rc);
The message should just be dropped as the call will print the failure
message anyway.
thanks,
greg k-h
prev parent reply other threads:[~2020-05-29 5:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 1:01 [PATCH] misc: mic: Replace kmalloc with kzalloc in the error message Yi Wang
2020-05-29 5:38 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200529053836.GA525659@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexios.zavras@intel.com \
--cc=allison@lohutok.net \
--cc=arnd@arndb.de \
--cc=ashutosh.dixit@intel.com \
--cc=liao.pingfang@zte.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.dutt@intel.com \
--cc=tglx@linutronix.de \
--cc=wang.liang82@zte.com.cn \
--cc=wang.yi59@zte.com.cn \
--cc=xue.zhihong@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.