On Wed, Jun 11, 2014 at 09:44:31AM +0200, Matthias Beyer wrote: > Signed-off-by: Matthias Beyer <mail@xxxxxxxxxxxxxxxx> > --- > drivers/staging/bcm/InterfaceMisc.c | 74 ++++++++++++++++++------------------- > 1 file changed, 35 insertions(+), 39 deletions(-) > > diff --git a/drivers/staging/bcm/InterfaceMisc.c b/drivers/staging/bcm/InterfaceMisc.c > index fff7d68..51f6e1f 100644 > --- a/drivers/staging/bcm/InterfaceMisc.c > +++ b/drivers/staging/bcm/InterfaceMisc.c > @@ -1,36 +1,49 @@ > #include "headers.h" > > +static int adapter_err_check(const struct bcm_interface_adapter *ad, int *err) Boolean functions should have more clear names than this. But also don't make this a boolean, just return zero on success or the error code. This function is needlessly complicated. Do preserve the error code: err = adapter_err_check(psIntfAdapter); if (err) return err; Also, run your patches through checkpatch.pl before sending. That said, I do like this function and how you are making the code more readable as well as removing duplicate code. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel