Re: [PATCH] drivers/media/pci/solo6x10/solo6x10-disp.c: check kzalloc() result

2014-07-26 Thread Dan Carpenter
On Fri, Jul 25, 2014 at 09:32:36PM +0300, Andrey Utkin wrote:
 Please ignore. I didn't notice that Hans has already posted a patch
 fixing that and more.
 

Heh.  I was just about to send my fix for this bug as well.

I don't follow linux-media so I didn't realize this driver was getting
promoted out of staging.  I wish there was a way to go over drivers and
fix any basic static checker fixes before promotion.

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


[PATCH] drivers/media/pci/solo6x10/solo6x10-disp.c: check kzalloc() result

2014-07-25 Thread Andrey Utkin
Signed-off-by: Andrey Utkin andrey.ut...@corp.bluecherry.net
---
 drivers/media/pci/solo6x10/solo6x10-disp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/pci/solo6x10/solo6x10-disp.c 
b/drivers/media/pci/solo6x10/solo6x10-disp.c
index ed88ab4..93cbbb1 100644
--- a/drivers/media/pci/solo6x10/solo6x10-disp.c
+++ b/drivers/media/pci/solo6x10/solo6x10-disp.c
@@ -216,6 +216,8 @@ int solo_set_motion_block(struct solo_dev *solo_dev, u8 ch,
int ret = 0;
 
buf = kzalloc(size, GFP_KERNEL);
+   if (!buf)
+   return -ENOMEM;
for (y = 0; y  SOLO_MOTION_SZ; y++) {
for (x = 0; x  SOLO_MOTION_SZ; x++)
buf[x] = cpu_to_le16(thresholds[y * SOLO_MOTION_SZ + 
x]);
-- 
1.8.5.5

--
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


Re: [PATCH] drivers/media/pci/solo6x10/solo6x10-disp.c: check kzalloc() result

2014-07-25 Thread Andrey Utkin
Please ignore. I didn't notice that Hans has already posted a patch
fixing that and more.

-- 
Bluecherry developer.
--
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