All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Morel <pmorel@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, frankja@linux.ibm.com,
	david@redhat.com, cohuck@redhat.com, imbrenda@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH v1 4/5] s390x: css: SCHM tests format 0
Date: Wed, 3 Feb 2021 11:09:02 +0100	[thread overview]
Message-ID: <26db612d-45ea-de8b-5eed-bd2658f69aa0@linux.ibm.com> (raw)
In-Reply-To: <b3086f69-98fa-07c0-72c7-711c17e71c9d@redhat.com>



On 2/2/21 6:35 PM, Thomas Huth wrote:
> On 29/01/2021 15.34, Pierre Morel wrote:
...snip...
>>   static void test_schm(void)
>>   {
>> +    struct measurement_block_format0 *mb0;
>> +
>>       if (css_general_feature(CSSC_EXTENDED_MEASUREMENT_BLOCK))
>>           report_info("Extended measurement block available");
>> +
>> +    mb0 = alloc_io_mem(sizeof(struct measurement_block_format0), 0);
>> +    if (!mb0) {
>> +        report(0, "measurement_block_format0 allocation");
>> +        goto end_free;
> 
> If allocation failed, there is certainly no need to try to free it, so 

:) yes

> you can get rid of the goto and the label here and return directly 
> instead. Or maybe
> Maybe also simply use report_abort() in this case?

OK, report_abort when an allocation failed seems right.

Thanks,
Pierre

-- 
Pierre Morel
IBM Lab Boeblingen

      reply	other threads:[~2021-02-03 10:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1611930869-25745-1-git-send-email-pmorel@linux.ibm.com>
     [not found] ` <1611930869-25745-4-git-send-email-pmorel@linux.ibm.com>
2021-02-02 11:48   ` [kvm-unit-tests PATCH v1 3/5] s390x: css: implementing Set CHannel Monitor Cornelia Huck
2021-02-02 16:15     ` Pierre Morel
2021-02-02 17:32   ` Thomas Huth
2021-02-03 10:09     ` Pierre Morel
     [not found] ` <1611930869-25745-6-git-send-email-pmorel@linux.ibm.com>
2021-02-02 11:52   ` [kvm-unit-tests PATCH v1 5/5] s390x: css: testing measurement block format 1 Cornelia Huck
     [not found] ` <1611930869-25745-2-git-send-email-pmorel@linux.ibm.com>
2021-02-01 10:01   ` [kvm-unit-tests PATCH v1 1/5] s390x: css: Store CSS Characteristics Janosch Frank
2021-02-01 12:09     ` Pierre Morel
2021-02-02 11:11   ` Cornelia Huck
2021-02-02 14:19     ` Pierre Morel
2021-02-02 17:25   ` Thomas Huth
2021-02-03 10:12     ` Pierre Morel
     [not found] ` <1611930869-25745-3-git-send-email-pmorel@linux.ibm.com>
2021-02-01 10:11   ` [kvm-unit-tests PATCH v1 2/5] s390x: css: simplifications of the tests Janosch Frank
2021-02-01 12:15     ` Pierre Morel
2021-02-01 12:22       ` Janosch Frank
2021-02-02 11:23   ` Cornelia Huck
2021-02-02 14:39     ` Pierre Morel
2021-02-02 17:29   ` Thomas Huth
2021-02-03 10:10     ` Pierre Morel
     [not found] ` <1611930869-25745-5-git-send-email-pmorel@linux.ibm.com>
2021-02-02 17:35   ` [kvm-unit-tests PATCH v1 4/5] s390x: css: SCHM tests format 0 Thomas Huth
2021-02-03 10:09     ` Pierre Morel [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=26db612d-45ea-de8b-5eed-bd2658f69aa0@linux.ibm.com \
    --to=pmorel@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=thuth@redhat.com \
    /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.