Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1601076 > unrolled thread
| Started by | Daeseok Youn <daeseok.youn@gmail.com> |
|---|---|
| First post | 2017-03-15 07:00 +0100 |
| Last post | 2017-03-15 07:00 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 1/4] staging: atomisp: fix unsigned int comparison with less than zero Daeseok Youn <daeseok.youn@gmail.com> - 2017-03-15 07:00 +0100
| From | Daeseok Youn <daeseok.youn@gmail.com> |
|---|---|
| Date | 2017-03-15 07:00 +0100 |
| Subject | [PATCH 1/4] staging: atomisp: fix unsigned int comparison with less than zero |
| Message-ID | <tla8y-38X-9@gated-at.bofh.it> |
Fix warnings from the smatch tool
atomisp_cmd.c:2649
atomisp_set_array_res() warn:
unsigned 'config->width' is never less than zero.
atomisp_cmd.c:2650
atomisp_set_array_res() warn:
unsigned 'config->height' is never less than zero.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
index 1ee99d0..9c3ba11 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
@@ -2646,8 +2646,7 @@ int atomisp_set_array_res(struct atomisp_sub_device *asd,
struct atomisp_resolution *config)
{
dev_dbg(asd->isp->dev, ">%s start\n", __func__);
- if (config == NULL || config->width < 0
- || config->height < 0) {
+ if (!config) {
dev_err(asd->isp->dev, "Set sensor array size is not valid\n");
return -EINVAL;
}
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web