truct iss_device *iss)
> return;
>
> mutex_lock(>iss_mutex);
> - BUG_ON(iss->ref_count == 0);
> + WARN_ON(iss->ref_count == 0);
ref_counting bugs often have a security aspect. BUG_ON() is probably
safer here. Better to crash than to lose all your bitcoin.
regards,
dan carpenter
h_strobe(fled_cdev, false);
^
but we had an old unchecked dereference here.
211 case V4L2_FLASH_LED_MODE_FLASH:
212 /* Turn the torch LED off */
regards,
dan carpenter
end of the list.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/dvb-frontends/dib9000.h
b/drivers/media/dvb-frontends/dib9000.h
index b10a70aa7c9f..40883b41e66b 100644
--- a/drivers/media/dvb-frontends/dib9000.h
+++ b/drivers/media/dvb-frontends/di
This function is broken. It sets the wrong front_end to NULL. But it's
not used, so let's just delete it.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/dvb-frontends/dib8000.h
b/drivers/media/dvb-frontends/dib8000.h
index 2b8b4b1656a2..75cc8e47ec8f
These clamp_t() calls are no-ops because we don't save the results. It
leads to an array out of bounds bug.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/staging/media/atomi
^^^
Patch adds new unchecked dereference.
457 ? VI6_WPF_SRCRPF_VIRACT_MST
458 : VI6_WPF_SRCRPF_VIRACT2_MST;
regards,
dan carpenter
shift wrap around
to a bit which is set.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 660bacb8f7d9..8c633b8f30e7 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -618,7 +618,
This breaks the build. Always try to compile your patches.
regards,
dan carpenter
Looks good.
regards,
dan carpenter
ve values
of "index" to be treated as -EINVAL but they're not so we can read from
before the start of the res_table[] array.
I've fixed this by making "res_num" a u32. I made "cur_res" a u32 as
well, just for consistency.
Fixes: a49d25364dfb ("staging/ato
so we don't read before the start of the
dev->curr_res_table[] array. I've made "entries_curr_table" unsigned
long to fix this. I thought about making it unsigned int, but because
of struct alignment, it doesn't use more memory either way.
Fixes: a49d25364dfb ("staging/atomisp: A
VAL;
"input->index" is a u32 which comes from the ioctl. We want negative
values of "index" to be counted as -EINVAL but they aren't. I've fixed
this by changing the type of "isp->input_cnt" to unsigned int.
Fixes: a49d25364dfb ("staging/atomisp:
t'
> > wouldn't
> > break something.
>
> I think Dan was recommending the opposite here, if I understood you
> both correctly:
> he said we should propagate the error code unless we know it's wrong, while
> you
> want to keep the current behavior to avoid introducing changes ;-)
>
I don't know the subsystem rules at all, so don't listen to me.
regards,
dan carpenter
ey aren't. There are several ways to fix
this but I feel like the best fix for future proofing is to change the
type of N_RES from int to unsigned long to make it the same as if we
were comparing against ARRAY_SIZE().
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/driver
On Fri, Jul 14, 2017 at 03:55:26PM +0300, Dan Carpenter wrote:
> I don't agree with it as a static analysis dev...
What I mean is if it's a macro that returns -ENODEV or a function that
returns -ENODEV, they should both be treated the same. The other
warnings this check prints are quite cle
Ah... I see why it's complaining about these ones in particular...
I don't agree with it as a static analysis dev, and I don't like the
changes too much. But since it's only generating a hand full of
warnings then I don't care.
regards,
dan carpenter
Y8_2X8)
1175 bridge = ISPCTRL_PAR_BRIDGE_BENDIAN;
1176 else
1177 bridge = ISPCTRL_PAR_BRIDGE_DISABLE;
1178
1179 omap3isp_configure_bridge(isp, ccdc->input, parcfg, shift,
bridge);
regards,
dan carpenter
real bugs. Just disable it.
Changing the code to propagate error codes, is the right thing of course
so long as it doesn't introduce bugs.
regards,
dan carpenter
598 pdata->card_name = "DA850/OMAP-L138 Video Capture";
1599
1600 return pdata;
1601 }
regards,
dan carpenter
n about this.
274 if (tx == NULL) {
275 pr_err("%s: DMA interleaved prep error\n", __func__);
276 return -EINVAL;
regards,
dan carpenter
ning -EINVAL a few lines later
because the .camera pointer is NULL.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c
b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c
index 6064bb823a47..a
On Mon, May 15, 2017 at 12:21:45PM +0200, walter harms wrote:
> can this strcpy_s() replaced with strlcpy ?
>
These functions obviously should be removed, yes. Please send a patch
for that and we can drop my patches. Give David reported-by credit.
regards,
dan carpenter
pport for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git
a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h
b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h
in
We should verify that "ix < max_len" before we test whether we have
reached the NUL terminator.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Reported-by: David Binderman <dcb...@hotmail.com>
Signed-off-by: Dan Carpenter <dan.c
Oops. Please ignore this one. I meant to send it to David Binderman's
thread.
regards,
dan carpenter
We should verify that "ix < max_len" before we test whether we have
reached the NUL terminator.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Reported-by: David Binderman <dcb...@hotmail.com>
Signed-off-by: Dan Carpenter <dan.c
,
> + port, lanes, bayer_order);
This introduces a checkpatch.pl warning. Do it like this:
[tab][tab][tab][space]"camera pdata: port: %d lanes: %d order: %8.8x\n",
regards,
dan carpenter
in_subdev *gs;
> -struct i2c_client *client = v4l2_get_subdevdata(subdev);
> + struct i2c_client *client = v4l2_get_subdevdata(subdev);
Wut? How would this be correct?
regards,
dan carpenter
size, mask, check)
> \
> +property_read(prop, size, mask))
breaks the build.
regards,
dan carpenter
These sanity checks don't work because they use && instead of ||. It's
impossible to be both negative and greater than 5.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drive
This patch mostly adds unlocks to error paths. But one additional small
change is that I made the first "break;" a "goto unlock;" which means
that now we return failure instead of success on that path.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --g
Mostly this adds some unlocks to error paths. But, if you see where
there were "break;" statements before, I changed those paths to return
error codes instead of returning success.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/usb/dvb-usb/d
mework")
Fixes tags are always good too have btw. You should be adding them
by default to everything even if it doesn't get backported to stable.
regards,
dan carpenter
default:
142 break;
143 }
regards,
dan carpenter
c failed!\n", __func__);
> + dev_err(atomisp_dev, "%s: failed!\n", __func__);
The whole printk can be removed. kmem_cache_alloc() has its own better
printks.
regards,
dan carpenter
Also fix your From header.
regards,
dan carpenter
The subject is too long.
On Mon, Mar 20, 2017 at 10:02:33PM +1100, unknown wrote:
> Signed-off-by: Eddie Youseph <psyblas...@gmail.com>
You need to have a changelog.
regards,
dan carpenter
if-statement
> has the condition to check whether the css_pipe_id equals to
> 'CSS_PIPE_ID_COPY' or not. It should be removed.
>
> Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com>
The patch is correct but the changelog is not.
s/CSS_PIPE_ID_COPY/CSS_PIPE_ID_YUVPP/
regards,
dan carpenter
We call this function with the lock held and should also return with the
lock held as well. This one error path is not-consistent because we
should return without the lock held.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/staging/media/atomisp/pci/atomis
There are some error paths in atomisp_css_frame_allocate() which don't
initialize "res" so it could lead us to try release random memory.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
di
It's a post-op loop so we timeout with "max_wait" set to -1, not 0.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.
Static analysis tools suggest that we probably want a break statement
here before then next cast statement. Looks true to me.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drive
Static checkers complain that we should check if "i" is in bounds
before we check if "var8[i]" is a NUL char. This bug is harmless but
also easy to fix.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git
a/drivers/staging/media/atomisp/platform/intel-m
We shouldn't pass devm allocated pointers to kfree() or it leads to a
double free.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/staging/media/atomisp/i2c/imx/otp_brcc064_e2p
We should be doing i-- on all error paths but we don't if the loop
finishes successfully. I've re-arranged this so that we don't read
beyond the end of acc_flag_to_pipe[] array.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter &
These print an uninitialized value for "opt". Let's just remove the
printk.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c
b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c
in
s impossible. Was UINT_MAX intended?
677 return -EINVAL;
678
regards,
dan carpenter
md_type is an enum. On my tests, GCC treats it as unsigned but
according to the C standard it's an implementation dependant thing so we
should check for negatives.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpen.
; (vzalloc is for same reason with kzalloc)
>
> And also atomisp_kernel_malloc() can be used with
> atomisp_kernel_zalloc(, false);
>
We should just change all the callers to kvmalloc() and kvzmalloc().
regards,
dan carpenter
No. Imagine the v4l2_subdev_call() loop exits with "fmt" set to NULL.
It will cause a crash.
Please re-read my original email because I think you may have meant to
reset fmt after that loop.
regards,
dan carpenter
num_fmts++;
1496
1497 fmt++;
1498 }
1499
1500 if (!num_fmts)
1501 return -ENXIO;
regards,
dan carpenter
On Sun, Mar 05, 2017 at 10:43:19AM +1300, Derek Robson wrote:
> On Sat, Mar 04, 2017 at 02:57:22PM +0300, Dan Carpenter wrote:
> > Copy a patch prefix that everyone else has been using:
> >
> > git log --oneline drivers/staging/media/platform/bcm2835/
> >
> >
Copy a patch prefix that everyone else has been using:
git log --oneline drivers/staging/media/platform/bcm2835/
The subject is too vague as well.
regards,
dan carpenter
gt; + }
> +
> +err:
> + free_duped_table(table);
> + return ERR_PTR(ret);
ret isn't initialized on success.
> }
>
regards,
dan carpenter
On Fri, Feb 24, 2017 at 10:38:38PM +0100, Stefan Wahren wrote:
>
> > Dan Carpenter <dan.carpen...@oracle.com> hat am 24. Februar 2017 um 20:57
> > geschrieben:
> >
> >
> > On Fri, Feb 24, 2017 at 01:37:30PM +0100, Stefan Wahren wrote:
> > > Hi
n't checked your patch yet.
It takes like 30 seconds to review this patch. Do you use mutt? I have
a macro that applies patches and loads vim at the right line.
regards,
dan carpenter
The unwinding here isn't right. We don't free gdev[0] and instead
free 1 step past what was allocated. Also we can't allocate "dev" then
we should unwind instead of returning directly.
Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera
driver."
We should unlock before returning on this error path.
Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera
driver.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/staging/media/platform/bcm2835/mmal-vchiq.c
b/drivers/stagin
.
regards,
dan carpenter
On Wed, Feb 15, 2017 at 01:47:55PM +0100, walter harms wrote:
>
>
> Am 15.02.2017 13:25, schrieb Dan Carpenter:
> > We should free gdev[0] so the > should be >=.
> >
> > Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera
> >
We should free gdev[0] so the > should be >=.
Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera
driver.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/staging/media/platform/bcm2835/bcm2835-camera.c
b/drivers/staging/
eader, _offset);
410 if (ret) {
411 pctx->stream_errors++;
412 goto err;
413 }
414
415 au.paddr += data_offset;
^^^^^^^
416 au.vaddr += data_offset;
regards,
dan carpenter
On Sat, Dec 03, 2016 at 03:14:26PM +0530, Tabrez khan wrote:
> Add parentheses around variable x for the readability purpose.
>
It's not really about readability...
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the b
You're, of course, correct that this code could be cleaned up...
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
We should be returning negative error codes here or it leads to a crash.
This also silences a static checker warning.
drivers/media/pci/mantis/mantis_cards.c:250 mantis_pci_probe()
warn: 'mantis->dmxdev.dvbdev->fops' double freed
Signed-off-by: Dan Carpenter <d
ion checks without it.
Generally lengths are numbers and not booleans so "len == 0" is ok.
Checkpatch doesn't complain about that.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel
You will never win an ELIZA bot challenge against Markus. :P I admire
your optimism though.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.
rically
just from looking at which code has the most bugs, then single exit
labels are the most buggy.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Nov 28, 2016 at 04:49:36PM +0200, Laurent Pinchart wrote:
> Hi Julia and Dan,
>
> On Monday 28 Nov 2016 14:54:58 Julia Lawall wrote:
> > On Mon, 28 Nov 2016, Dan Carpenter wrote:
> > > I understand the comparison, but I just think it's better if people
> > &
ren't allocated"... It's garbage code.
But I understand that other people don't agree.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
This is a double free, isn't it? It should just be goto del_cdev;
182 goto err_out;
183 }
184
185 ir->cdev = cdev;
186
187 return 0;
188
189 err_out:
190 cdev_del(cdev);
Can't pass NULLs to this function.
19
APIs")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/platform/ti-vpe/vpdma.c
b/drivers/media/platform/ti-vpe/vpdma.c
index 13bfd71..23472e3 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -453
That honestly seems
like a simple rule to me, whenever I touch error handling code it feels
better and simpler after I fix the bugs. Error handling doesn't have to
be complicated if you just follow the rules.
regards,
dan carpenter
--
To unsubscribe from this list: send the line &qu
patch. Feel free to send it. ;)
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
A recent cleanup introduced a potential dereference of -EFAULT when we
call kfree(map->menu_info).
Fixes: 4cc5bed1caeb ("[media] uvcvideo: Use memdup_user() rather than
duplicating its implementation")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/dr
We should unlock before returning this error code in vpfe_reqbufs().
Fixes: 622897da67b3 ("[media] davinci: vpfe: add v4l2 video driver support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c
b/drive
We pass an int pointer to stk_camera_read_reg() but only write to the
highest byte. It's a bug on big endian systems and generally a nasty
thing to do and doesn't match the write function either.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
v2: I forgot to update stk-se
We pass an int pointer to stk_camera_read_reg() but only write to the
highest byte. It's a bug on big endian systems and generally a nasty
thing to do and doesn't match the write function either.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/usb/stk
usb/dvb-usb/dib0700_core.c:338 dib0700_i2c_xfer_legacy() warn:
inconsistent returns 'mutex:>usb_mutex'.
Locked on: line 301
line 322
Unlocked on: line 287
line 291
line 338
regards,
dan carpenter
--
To unsubscribe from this list: send th
if (result < 0) {
270 deb_info("i2c write error (status =
%d)\n", result);
271 break;
272 }
273 }
274 }
275 mutex_unlock(>i2c_mutex);
276 return i;
277 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Nov 09, 2016 at 02:45:21PM +0100, Hans Verkuil wrote:
> On 11/09/16 14:28, Dan Carpenter wrote:
> >Hello Tiffany Lin,
> >
> >The patch 590577a4e525: "[media] vcodec: mediatek: Add Mediatek V4L2
> >Video Decoder Driver" from Sep 2, 2016, leads to th
%d) vb=%p",
544 ctx->id, buf->type, buf->index,
545 mtkbuf->lastframe, buf->bytesused,
546 buf->m.planes[0].bytesused, buf->length,
547 vb);
548
This patch introduces bugs. It's my policy to not explain the Markus's
bugs because otherwise he will just resend the patchset and I have asked
him many times to stop.
I will happily review bug fix patches but I really think he should stop
sending these cleanup patches.
regards,
dan carpenter
On Mon, Oct 24, 2016 at 10:59:24PM +0200, SF Markus Elfring wrote:
> + dev->isoc_ctl.transfer_buffer = kcalloc(num_bufs,
> + sizeof(*dev->isoc_ctl
> +.transfer_buffer),
This is ugly
I have asked you about six or seven times to only send bug fixes and
stop sending clean up patches. You have refused. But now I'm asking
you to stop randomly doing things without at least thinking about it for
a bit.
The original code was correct.
regards,
dan carpenter
--
To unsubscribe from
video encoder V4L2 driver")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/platform/sti/hva/hva-hw.c
b/drivers/media/platform/sti/hva/hva-hw.c
index d341d49..cf2a8d8 100644
--- a/drivers/media/platform/sti/hva/hva-hw.c
+++ b/drivers/media/platform/
.com>
> Signed-off-by: Shailendra Verma <shailendr...@samsung.com>
Calling kfree(NULL) is fine so there is no bug in the original code.
Also this patch creates a new locking bug.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media&
devm_pinctrl_get() can fail so we should check for that.
Fixes: 0a6824bc10de ('[media] v4l2: blackfin: select proper pinctrl state in
ppi_set_params if CONFIG_PINCTRL is enabled')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/platform/blackfin/pp
len = 13;
1159 memcpy(osd, msg->msg + 3, len);
1160 osd[len] = '\0';
1161 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo
for logical
address %d\n",
1448 adap->phys_addrs[init_laddr], init_laddr);
1449 break;
1450
1451 case CEC_MSG_USER_CONTROL_PRESSED:
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-
a] dvb core:
must check dvb_create_media_graph()').
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
index 6477b04..a04c0a2 100644
--- a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/usb/dvb-usb/d
The extra calls to video_device_release() are a bug, we free these after
the goto.
Fixes: c974c436eaf4 ('s5p-mfc: Fix race between s5p_mfc_probe() and
s5p_mfc_open()')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
This code would be easier to understand if it didn't use &quo
The code is checking for negative returns but it should be checking for
zero.
Fixes: aab3125c43d8 ('[media] em28xx: add support for registering multiple i2c
buses')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Use different error code.
diff --git a/drivers/media/usb/em28xx/
On Wed, Apr 27, 2016 at 07:31:59AM -0300, Mauro Carvalho Chehab wrote:
> I don't like magic numbers, but, in this very specific case, setting
> frames per second (fps) var to 25 or 30 makes much more sense.
Fine fine. I buy that rationale.
regards,
dan carpenter
--
To unsubscrib
The > ARRAY_SIZE() should be >= ARRAY_SIZE(). Also this is a slightly
unrelated cleanup but I replaced the magic numbers 30 and 25 with
ARRAY_SIZE() - 1.
Fixes: 363d79f1d5bd ('[media] tw686x: Don't go past array')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --g
We print an uninitialized "actlen" variable on the error path.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c
b/drivers/media/usb/cx231xx/cx231xx-core.c
index f497888..6741fd0 100644
--- a/drivers/media/usb/cx231x
= id;
883 return 0;
884 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
TYPE_UNKNOWN;
104 *scancode = b;
105 return 1;
106 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
539 ret = i2c_smbus_write_byte_data(client, VDELAY_LO,
540 vdelay & 0xff);
541 if (!ret)
542 ret = i2c_smbus_write_byte_data(client, VACTIVE_LO,
543 vact & 0xff);
544
545
Smatch complains that there are some paths where "status" isn't
initialized. The code does assume that m5mols_read_u8() can fail so it
seems as if Smatch is correct.
Let's initialize it to REG_ISO_AUTO which is zero.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff
101 - 200 of 680 matches
Mail list logo