diff mbox series

[U-Boot] ihs_video_out: Fix error handling

Message ID 20190128085058.19492-1-mario.six@gdsys.cc
State Accepted
Commit 6df07d854b9ee81d31fafcd83724bed7fb1fd6d7
Delegated to: Anatolij Gustschin
Headers show
Series [U-Boot] ihs_video_out: Fix error handling | expand

Commit Message

Mario Six Jan. 28, 2019, 8:50 a.m. UTC
The ihs_video_out driver's error handling is incorrect in two places
(one is a missing negation, and in one place a error should be ignored).

Fix these two instances.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
---
 drivers/video/ihs_video_out.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Anatolij Gustschin Jan. 28, 2019, 8:31 p.m. UTC | #1
On Mon, 28 Jan 2019 09:50:58 +0100
Mario Six mario.six@gdsys.cc wrote:

> The ihs_video_out driver's error handling is incorrect in two places
> (one is a missing negation, and in one place a error should be ignored).
> 
> Fix these two instances.
> 
> Signed-off-by: Mario Six <mario.six@gdsys.cc>
> ---
>  drivers/video/ihs_video_out.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-video/master, thanks!

--
Anatolij
diff mbox series

Patch

diff --git a/drivers/video/ihs_video_out.c b/drivers/video/ihs_video_out.c
index 5cdf17aec14..0af7c2bf44a 100644
--- a/drivers/video/ihs_video_out.c
+++ b/drivers/video/ihs_video_out.c
@@ -238,8 +238,8 @@  int ihs_video_out_probe(struct udevice *dev)
 	int res;
 
 	res = regmap_init_mem(dev_ofnode(dev), &priv->map);
-	if (!res) {
-		debug("%s: Could initialize regmap (err = %d)\n", dev->name,
+	if (res) {
+		debug("%s: Could not initialize regmap (err = %d)\n", dev->name,
 		      res);
 		return res;
 	}
@@ -322,7 +322,7 @@  int ihs_video_out_probe(struct udevice *dev)
 	}
 
 	res = display_enable(priv->video_tx, 8, &timing);
-	if (res) {
+	if (res && res != -EIO) { /* Ignore missing DP sink error */
 		debug("%s: Could not enable the display (err = %d)\n",
 		      dev->name, res);
 		return res;