Alan Cox wrote:
You can push the goto for error paths thing too far.
if r < 0)
printk(KERN_...)
}
[and should be KERN_ERR / KERN_WARNING - probably warning ?
Thanks for the review - have changed to WARNING - sorry haven't done any
kernel programming for quite a while now...
For the goto thing - I do make two uses of the goto:
/* Get current values */
r = ch341_control_in(...);
if (r < 0)
goto timeout;
/* Compute new values */
r = ch341_control_out(...);
if (r < 0)
goto timeout;
return;
timeout:
printk(KERN_WARNING...);
}
... so I thought that was OK? I'm happy to change to a different idiom
tho'...
Cheers,
Tim.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html