From: "Alex Bennée" <alex.bennee@linaro.org>
To: Li Qiang <liq3ea@163.com>
Cc: jasowang@redhat.com, liq3ea@gmail.com, qemu-devel@nongnu.org,
mst@redhat.com
Subject: Re: [PATCH] virtio: vdpa: omit check return of g_malloc
Date: Fri, 18 Sep 2020 14:14:12 +0100 [thread overview]
Message-ID: <87o8m3w7kr.fsf@linaro.org> (raw)
In-Reply-To: <20200819144309.67579-1-liq3ea@163.com>
Li Qiang <liq3ea@163.com> writes:
> If g_malloc fails, the application will be terminated.
> No need to check the return value of g_malloc.
>
> Signed-off-by: Li Qiang <liq3ea@163.com>
I think this is fine because a failure to config the dev would just
cause an error_report later and it's extremely unlikely you don't have
enough memory to get that far anyway.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
prev parent reply other threads:[~2020-09-18 13:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 14:43 [PATCH] virtio: vdpa: omit check return of g_malloc Li Qiang
2020-08-19 15:07 ` Philippe Mathieu-Daudé
2020-08-20 1:26 ` Li Qiang
2020-09-18 13:12 ` Alex Bennée
2020-09-23 18:06 ` Eric Blake
2020-09-18 12:53 ` Laurent Vivier
2020-09-18 12:53 ` Laurent Vivier
2020-09-23 17:08 ` Laurent Vivier
2020-09-23 17:08 ` Laurent Vivier
2020-09-18 13:14 ` Alex Bennée [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=87o8m3w7kr.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=jasowang@redhat.com \
--cc=liq3ea@163.com \
--cc=liq3ea@gmail.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.