From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: David Airlie <airlied@linux.ie>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
xen-devel@lists.xen.org
Subject: Re: [PATCH 1/3] drm/xen-front: checking for NULL instead of IS_ERR
Date: Tue, 8 May 2018 14:50:57 +0300 [thread overview]
Message-ID: <1d60df53-8c37-0830-951c-ec0b34b5af53@gmail.com> (raw)
In-Reply-To: <0d0ce12b-5dbc-dc36-b57b-6d93e98f3f04@gmail.com>
On 05/08/2018 12:34 PM, Oleksandr Andrushchenko wrote:
> On 05/08/2018 12:26 PM, Dan Carpenter wrote:
>> drm_dev_alloc() returns error pointers, it never returns NULL.
>>
>> Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display
>> frontend")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Thank you,
> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Applied to drm-misc-next,
Thank you
>>
>> diff --git a/drivers/gpu/drm/xen/xen_drm_front.c
>> b/drivers/gpu/drm/xen/xen_drm_front.c
>> index 1b0ea9ac330e..8615e8522c7a 100644
>> --- a/drivers/gpu/drm/xen/xen_drm_front.c
>> +++ b/drivers/gpu/drm/xen/xen_drm_front.c
>> @@ -543,8 +543,8 @@ static int xen_drm_drv_init(struct
>> xen_drm_front_info *front_info)
>> front_info->drm_info = drm_info;
>> drm_dev = drm_dev_alloc(&xen_drm_driver, dev);
>> - if (!drm_dev) {
>> - ret = -ENOMEM;
>> + if (IS_ERR(drm_dev)) {
>> + ret = PTR_ERR(drm_dev);
>> goto fail;
>> }
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2018-05-08 11:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-08 9:26 [PATCH 1/3] drm/xen-front: checking for NULL instead of IS_ERR Dan Carpenter
2018-05-08 9:34 ` Oleksandr Andrushchenko
2018-05-08 11:50 ` Oleksandr Andrushchenko [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=1d60df53-8c37-0830-951c-ec0b34b5af53@gmail.com \
--to=andr2000@gmail.com \
--cc=airlied@linux.ie \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=oleksandr_andrushchenko@epam.com \
--cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).