Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <[email protected]> you wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>

Please add a commit message that exaplains what you are doing. Your
Subject: line is not sufficient.

> +int serial_init (void)
> +{
> +     struct stdio_dev *dev = serial_get_current_device();
>  
> -     if (serial_current->start)
> -             return serial_current->start (serial_current);
> +     if (dev->start)
> +             return dev->start (dev);

What happens if dev == NULL ?

>  void serial_setbrg (void)
>  {
> -     if (!(gd->flags & GD_FLG_RELOC) || !serial_current) {
> -             struct stdio_dev *dev = default_serial_console ();
> -
> -             dev->setbrg (dev);
> -             return;
> -     }
> +     struct stdio_dev *dev = serial_get_current_device();
>  
> -     serial_current->setbrg (serial_current);
> +     dev->setbrg (dev);

What happens if dev == NULL ?

etc.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
No question is too silly to ask. Of course, some  questions  are  too
silly to to answer...  - L. Wall & R. L. Schwartz, _Programming Perl_
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to