[PATCH 28/35] media: usb: cx231xx: Refator return path

From: Ricardo Ribalda
Date: Mon Apr 15 2024 - 15:44:56 EST


This is a nop, but let cocci now that this is not a good candidate for
min()

rivers/media/usb/cx231xx/cx231xx-video.c:1282:12-13: WARNING opportunity for min()
drivers/media/usb/cx231xx/cx231xx-video.c:1328:12-13: WARNING opportunity for min()

Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
---
drivers/media/usb/cx231xx/cx231xx-video.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index 8f347bbeeb32..bbe207d72427 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -1279,7 +1279,10 @@ int cx231xx_g_register(struct file *file, void *priv,
default:
return -EINVAL;
}
- return ret < 0 ? ret : 0;
+
+ if (ret < 0)
+ return ret;
+ return 0;
}

int cx231xx_s_register(struct file *file, void *priv,
@@ -1325,7 +1328,10 @@ int cx231xx_s_register(struct file *file, void *priv,
default:
return -EINVAL;
}
- return ret < 0 ? ret : 0;
+
+ if (ret < 0)
+ return ret;
+ return 0;
}
#endif


--
2.44.0.683.g7961c838ac-goog