[RFC 3/7] staging: fbtft: add lcd controller abstraction

Dan Carpenter dan.carpenter at oracle.com
Tue Mar 3 12:04:34 UTC 2015


On Tue, Mar 03, 2015 at 12:57:29PM +0100, Noralf Trønnes wrote:
> >>+	ret = ctrl->rotate(ctrl, rotation);
> >>+	if (!ret)
> >>+		ctrl->rotation = rotation;
> >>+
> >>+	return ret;
> >Better to check "if (ret)" consistently (error handling vs success
> >handling).
> Like this?
> 
> 	ret = ctrl->rotate(ctrl, rotation);
> 	if (ret)
> 		return ret;
> 
> 	ctrl->rotation = rotation;
> 
> 	return 0;
> 

Yeah.  This is a tiny nit.  I feel a bit silly for commenting on it now.

regards,
dan carpenter



More information about the devel mailing list