* [PATCH] media: wl128x: Fix some error handling in fmc_prepare()
@ 2019-03-28 14:41 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-03-28 14:41 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Hans Verkuil, linux-media, kernel-janitors
The st_register() returns have changed over time, but these days it
never returns -1. We should just be checking for any negative error
codes.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/media/radio/wl128x/fmdrv_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c
index 1614809f7d35..c3b90f2ac93f 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -1521,7 +1521,7 @@ int fmc_prepare(struct fmdev *fmdev)
}
ret = 0;
- } else if (ret == -1) {
+ } else if (ret < 0) {
fmerr("st_register failed %d\n", ret);
return -EAGAIN;
}
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-28 14:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 14:41 [PATCH] media: wl128x: Fix some error handling in fmc_prepare() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).