qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 02/13] omap: Don't use hw_error() in device i


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 02/13] omap: Don't use hw_error() in device init() methods
Date: Thu, 17 Dec 2015 14:50:04 +0000

On 17 December 2015 at 14:30, Thomas Huth <address@hidden> wrote:
> On 17/12/15 13:19, Markus Armbruster wrote:
>> Device init() methods aren't supposed to call hw_error(), they should
>> report the error and fail cleanly.  Do that.

>> +
>> +    for (i = 0; i < s->modulecount; i++) {
>
> You're now using modulecount here -^
>
>> +        if (!s->fclk[i]) {
>> +            error_report("omap2-gpio: fclk%d not connected", i);
>> +            return -1;
>> +        }
>> +    }
>> +
>>      if (s->mpu_model < omap3430) {
>>          s->modulecount = (s->mpu_model < omap2430) ? 4 : 5;
>
> ... but it is initialized just here. So I think it is wrong that you
> moved the "!s->fclk[i]" before that.

Thanks for reviewing this patch more carefully than I did :-)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]