Re: [PATCH] added S6E63M0 AMOLED LCD Panel driver.

From: InKi Dae
Date: Tue Mar 30 2010 - 22:42:05 EST


Hi Andrew,

all the calls to s6e63m0_panel_send_sequence() would return -EINVAL.
by api_async() of driver/spi/spi.c
so I think that those return values aren't changed to other.

and final step is to check only whether the return value is 0 or not.
if you still think that this code has minor problem or you want it to
be corrected
then I will patch this code to be corrected anytime.

Thank you.

2010/3/31 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>:
> On Fri, 26 Mar 2010 12:24:24 +0900
> InKi Dae <daeinki@xxxxxxxxx> wrote:
>
>> +static int s6e63m0_ldi_init(struct s6e63m0 *lcd)
>> +{
>> +     int ret;
>> +
>> +     ret = s6e63m0_panel_send_sequence(lcd, SEQ_PANEL_CONDITION_SET);
>> +     ret |= s6e63m0_panel_send_sequence(lcd, SEQ_DISPLAY_CONDITION_SET);
>> +     ret |= s6e63m0_panel_send_sequence(lcd, SEQ_GAMMA_SETTING);
>> +     ret |= s6e63m0_panel_send_sequence(lcd, SEQ_ETC_CONDITION_SET);
>> +     ret |= s6e63m0_panel_send_sequence(lcd, SEQ_ACL_ON);
>> +     ret |= s6e63m0_panel_send_sequence(lcd, SEQ_ELVSS_ON);
>> +
>> +     return ret;
>> +}
>
> Well.  If one call to s6e63m0_panel_send_sequence() returns -ENOMEM and
> another call returns -EIO (for example), this function will return some
> other, incorrect errno.
>
> Which is a rather minor problem, unless some caller is explicitly
> looking for some particular error code, which doesn't happen often.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/