video: Adjust video_clear() to return an error

All driver-model operation should return an error code. Adjust this
function to do so also.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
Simon Glass 2018-10-01 12:22:26 -06:00
parent 25a3845d2b
commit c6ebd011bb
2 changed files with 5 additions and 2 deletions

View File

@ -86,7 +86,7 @@ int video_reserve(ulong *addrp)
return 0;
}
void video_clear(struct udevice *dev)
int video_clear(struct udevice *dev)
{
struct video_priv *priv = dev_get_uclass_priv(dev);
@ -111,6 +111,8 @@ void video_clear(struct udevice *dev)
memset(priv->fb, priv->colour_bg, priv->fb_size);
break;
}
return 0;
}
void video_set_default_colors(struct video_priv *priv)

View File

@ -120,8 +120,9 @@ int video_reserve(ulong *addrp);
* video_clear() - Clear a device's frame buffer to background color.
*
* @dev: Device to clear
* @return 0
*/
void video_clear(struct udevice *dev);
int video_clear(struct udevice *dev);
/**
* video_sync() - Sync a device's frame buffer with its hardware