Re: [PATCH] cxl: Unlock on error in probe

2017-05-05 Thread walter harms
Am 05.05.2017 09:14, schrieb Andrew Donnellan: > On 05/05/17 15:34, Dan Carpenter wrote: >> We should unlock if get_cxl_adapter() fails. >> >> Fixes: 594ff7d067ca ("cxl: Support to flash a new image on the adapter >> from a guest") >> Signed-off-by: Dan Carpenter >> >>

Re: [PATCH] cxl: Fix memory allocation failure test

2016-10-30 Thread walter harms
Am 30.10.2016 20:35, schrieb Christophe JAILLET: > 'cxl_context_alloc()' does not return an error pointer. It is just a > shortcut for a call to 'kzalloc' with 'sizeof(struct cxl_context)' as the > size parameter. > > So its return value should be compared with NULL. > While fixing it, simplify

Re: [PATCH] powerpc/powernv/pci: Use kmalloc_array() in two functions

2016-08-25 Thread walter harms
Am 24.08.2016 22:36, schrieb SF Markus Elfring: > From: Markus Elfring > Date: Wed, 24 Aug 2016 22:26:37 +0200 > > A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus reuse the

Re: [PATCH] cxl: replace loop with for_each_child_of_node(), remove unneeded of_node_put()

2016-07-29 Thread walter harms
Am 29.07.2016 05:55, schrieb Andrew Donnellan: > Rewrite the cxl_guest_init_afu() loop in cxl_of_probe() to use > for_each_child_of_node() rather than a hand-coded for loop. > > Remove the useless of_node_put(afu_np) call after the loop, where it's > guaranteed that afu_np == NULL. > >

Re: [patch -next] wan/fsl_ucc_hdlc: info leak in uhdlc_ioctl()

2016-07-14 Thread walter harms
Am 14.07.2016 12:34, schrieb Dan Carpenter: > There is a 2 byte struct whole after line.loopback so we need to clear > that out to avoid disclosing stack information. > > Fixes: c19b6d246a35 ('drivers/net: support hdlc function for QE-UCC') > Signed-off-by: Dan Carpenter

Re: Inconsistent use of size argument in kzalloc and memcpy in 'drivers/net/ethernet/toshiba/ps3_gelic_wireless.c'

2016-04-11 Thread walter harms
this is a case for kmemdup(). target->hwinfo=kmemdup(scan_info,be16_to_cpu(scan_info->size), GFP_KERNEL); re, wh Am 11.04.2016 12:00, schrieb Christophe JAILLET: > Hi, > > while looking at potential clean-up, I ended on the following code which > looks spurious to me. > > We allocate

Re: [PATCH v2] ALSA: aoa: convert bus code to use dev_groups

2015-06-11 Thread walter harms
Am 11.06.2015 10:03, schrieb Quentin Lambert: The dev_attrs field of struct bus_type is going away, use dev_groups instead. This converts the soundbus code to use the correct field. Given that all other usages of the macro define the struct attribute *xxx_attrs[] in the same file they

Re: [PATCH 2/2] arch/powerpc/platforms/powermac/setup.c: add missing of_node_put

2011-08-22 Thread walter harms
Am 21.08.2011 18:10, schrieb Julia Lawall: From: Julia Lawall ju...@diku.dk np is initialized to the result of calling a function that calls of_node_get, so of_node_put should be called before the pointer is dropped. The semantic match that finds this problem is as follows:

Re: [PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-09-01 Thread walter harms
Grant Likely schrieb: On Tue, Aug 31, 2010 at 10:16 AM, Vasiliy Kulikov sego...@gmail.com wrote: On Tue, Aug 31, 2010 at 18:08 +0200, Julia Lawall wrote: On Tue, 31 Aug 2010, walter harms wrote: if (strncmp(model, PowerBook, strlen(PowerBook)) != 0 strncmp(model, iBook, strlen

Re: [PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-08-31 Thread walter harms
Julia Lawall schrieb: Add a call to of_node_put in the error handling code following a call to of_find_node_by_path. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ local idexpression x; expression E,E1; statement S; @@