diff mbox series

[05/14] tuners/it913x.c: fix missing error code

Message ID 20210120094306.784318-6-hverkuil-cisco@xs4all.nl
State Accepted
Commit fec9b0e8491649386559dc154c113f569f908e6e
Headers show
Series Fixes for smatch/sparse/sysbot/compiler warnings | expand

Commit Message

Hans Verkuil Jan. 20, 2021, 9:42 a.m. UTC
Fixes this smatch warning:

drivers/media/tuners/it913x.c:65 it913x_init() warn: missing error code 'ret'

Set ret to -EINVAL if the clock identifier was invalid.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/tuners/it913x.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.c
index e8e66390be41..7696a28fe407 100644
--- a/drivers/media/tuners/it913x.c
+++ b/drivers/media/tuners/it913x.c
@@ -62,6 +62,7 @@  static int it913x_init(struct dvb_frontend *fe)
 		break;
 	default:
 		dev_err(&pdev->dev, "unknown clock identifier %d\n", utmp);
+		ret = -EINVAL;
 		goto err;
 	}