There is a typo so we call unlock instead of lock.
Fixes: 885dcd709ba9 ("powerpc/perf: Add nest IMC PMU support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
I also don't understand how the _imc_refc[node_id].lock works. Why
can't we use ref->lock eve
On Mon, Jul 31, 2017 at 04:03:40PM +1000, Paul Mackerras wrote:
> On Thu, Jul 13, 2017 at 10:38:29AM +0300, Dan Carpenter wrote:
> > There are some error paths in kvmppc_core_vcpu_create_e500() where we
> > forget to set the error code. It means that we return ERR_PTR(0) wh
On Mon, Jul 24, 2017 at 09:39:32AM +, Qiang Zhao wrote:
> On Mon 7/24/2017 3:04 PM, Dan Carpenter <dan.carpen...@oracle.com>
>
> > -Original Message-----
> > From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> > Sent: Monday, July 24, 2017 3:04
On Mon, Jul 24, 2017 at 02:24:14AM +, Qiang Zhao wrote:
> On Sat 7/22/2017 3:34 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote:
>
> > -Original Message-----
> > From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> > Sent: Saturday, July 22, 2017 3:34
The most important part of this change is that it not propogates error
codes instead of returning -EINVAL. There was also a tab missing, and
a couple other minor cleanups which don't affect runtime.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Not tested, but I don't
If "pdev = of_find_device_by_node(np2);" fails then it would lead to a
NULL dereference. This function is called from probe() and we're using
managed resources so we can just return without doing a manual cleanup.
Fixes: 35ef1c20fdb2 ("fsl/qe: Add QE TDM lib")
Signed-o
There are some error paths in kvmppc_core_vcpu_create_e500() where we
forget to set the error code. It means that we return ERR_PTR(0) which
is NULL and it results in a NULL pointer dereference in the caller.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/arch/power
We should set "err = -ENOMEM;", otherwise it means we're returning
ERR_PTR(0) which is NULL. It results in a NULL pointer dereference in
the caller.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
in
ble_name)" because that's the
prefered kernel style these days.
Fixes: d49747bdfb2d ("powerpc/mpc83xx: Power Management support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/arch/powerpc/platforms/83xx/suspend.c
b/arch/powerpc/platforms/83xx/sus
do you expect a close() after the open()
> failed ?
>
You can't close if open fails. Please don't ask rhetorical questions.
Just state everything in short sentences using simple words.
regards,
dan carpenter
device_open() fails because we don't have enough free memory or whatever
then we can try again later.
regards,
dan carpenter
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 <dan.carpen...@oracle.com>
diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
index 7c61c70ba3f6..374
quot;Error %lld disabling queue for prio %d\n", rc,
prio);
188 }
regards,
dan carpenter
^^^^^^^
Oops.
673 release_resources(adapter);
674 return -ENOMEM;
675 }
regards,
dan carpenter
kzalloc() won't actually fail because sizeof(*resize) is small, but
static checkers complain.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c
b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 8c68145ba1bd..710e491206ed 100644
--- a/arch/p
request OPAL event irq (%d)\n",
304 __func__, ret);
305 return ret;
306 }
307
308 return 0;
309 }
regards,
dan carpenter
return pnv_eeh_do_af_flr(pdn, option);
1036 }
regards,
dan carpenter
MVNIC_ERROR_LEVEL;
2967 crq.control_ras.level = val;
2968 ibmvnic_send_crq(adapter, );
2969
2970 return len;
2971 }
regards,
dan carpenter
On Wed, Oct 26, 2016 at 01:57:23PM -0500, Benjamin Herrenschmidt wrote:
> On Wed, 2016-10-26 at 16:03 +0300, Dan Carpenter wrote:
> > 565 cbdv = ((pllmr & 0x0006) >> 17) + 1; /* CPU:PLB */
> > 566 opdv = ((pllmr & 0x00018000) >>
^
This is zero. It looks like 0x0600 was probably intended?
568 epdv = ((pllmr & 0x1800) >> 11) + 2; /* PLB:EBC */
569 udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1;
570
571 /* check for 405GPr */
regards,
dan carpenter
On Wed, Oct 26, 2016 at 02:28:59PM +0200, Johannes Berg wrote:
> On Wed, 2016-10-26 at 15:26 +0300, Dan Carpenter wrote:
> > Someone was just mentioning in another thread that removing the check
> > from iounmap() is not portable to other arches and then I remembered
> >
Someone was just mentioning in another thread that removing the check
from iounmap() is not portable to other arches and then I remembered
that Markus removed a bunch of these.
We should consider reverting this, perhaps?
regards,
dan carpenter
On Sun, Jan 04, 2015 at 02:36:01PM +0100, SF Markus
On Thu, Aug 04, 2016 at 01:16:00PM -0700, Andrew Morton wrote:
> On Thu, 4 Aug 2016 08:35:25 +0300 Dan Carpenter <dan.carpen...@oracle.com>
> wrote:
>
> > We should set the error code here. Otherwise static checkers complain.
> >
>
> hm.
>
> > ---
We should return -ENOMEM if alloc_spu_gang() fails.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c
b/arch/powerpc/platforms/cell/spufs/inode.c
index 5be15cf..2975754 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++
We should set the error code here. Otherwise static checkers complain.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 984e816..68e7c0d 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/
My static checker complains that we need to unlock on this path. Seems
true.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index fc523c3..ab67ec4 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/driver
We can't assign -EINVAL to a u16.
Fixes: 3948f0e0c999 ('usb: add Freescale QE/CPM USB peripheral controller
driver')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c
b/drivers/usb/gadget/udc/fsl_qe_udc.c
index 93d28cb..901366f
igned-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c
index 0794f1c..42f0f22 100644
--- a/drivers/crypto/nx/nx.c
+++ b/drivers/crypto/nx/nx.c
@@ -392,7 +392,7 @@ static void nx_of_update_msc(struct device *dev,
out_be32(_immr->rsp[i].tibcr[j],
trap);
^^
525 }
526
527 /* Enable traps */
528 out_be32(_immr->rsp[i].eccr,
be32_to_cpu(ucode->eccr));
o) is invalid?
784 return -EINVAL;
785
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
20 dev_err(>dev, "Unexpected configuration record
size value\n");
921 return -EINVAL;
922 }
923
924 return 0;
925 }
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
Good point. Thanks.
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
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 <dan.carpen...@oracle.com>
---
v2: remove the other initialization t
There was clearly supposed to be a break statement here. Currently we
use the k2 ata timings instead of sh ata ones we intended. Probably no
one has this hardware anymore so it likely doesn't make a difference
beyond the static checker warning.
Signed-off-by: Dan Carpenter <dan.car
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 <dan.carpen...@oracle.com>
diff --git a/drivers/net/wan/fsl_ucc_hd
We use logical negate where bitwise negate was intended. It means that
we never return -EINVAL here.
Fixes: ce11e48b7fdd ('KVM: PPC: E500: Add userspace debug stub support')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/b
gt;idx * 4;
i is always one step beyond the end of the array here.
1186
1187 return 0;
1188 }
That arm and powerpc implementations have the same issue.
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
e? I'm not sure.
684 }
685 return rc;
686 }
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
*((u16 *)[2 + id * 2]) = value;
^^
2 + 7 * 2 = 16. We're write two bytes beyond the end of the array.
84 cmd.data_len = 14;
85 }
86
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev
The udc->eps[] array has USB_MAX_ENDPOINTS elements so > should be >=.
Fixes: 3948f0e0c999 ('usb: add Freescale QE/CPM USB peripheral controller
driver')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c
b/drivers
If ->get_char() returns a negative error code and that can mean that
"ch" is uninitialized. The callers of this function expect NO_POLL_CHAR
on error so let's return that.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/tty/hvc/hvc_console.
'.
> This is not consistent.
>
Good catch. be16_to_cpu(scan_info->size) is correct. It's surprising
that this bug wasn't caught in testing...
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
ic_write(qe_ic->regs, qe_ic_info[src].pri_reg, temp);
426
427 return 0;
428 }
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
-by: Dan Carpenter dan.carpen...@oracle.com
---
I assume checking for an error here will not change anything but I have
not tested this patch.
diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c
index cd146d4..b38b98c 100644
--- a/sound/soc/fsl/imx-wm8962.c
+++ b/sound/soc/fsl/imx
copied your patch
prefix from 8de2ae2a7f1f ('ASoC: fsl: add imx-wm8962 machine driver').
Really you should also have used ASoC: imx-wm8962: as well.
This is the third new driver today where I have faced this situation.
regards,
dan carpenter
___
Linuxppc
Normally, for staging drivers we just require the TODO and a maintainer
and we merge things as-is. There isn't really much review of the code.
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org
and it is not worth doing).
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
}
111 return pte;
112 }
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
m = fwdvb * 2 * ppdv;
577 else
578 m = fwdvb * cbdv * ppdv;
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org
There is a cut and paste bug so it returns success instead of the error
code.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index b9a2888..b04438c 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
The FCC_GFMR_TTX define is cut and pasted twice so we can remove the
second instance.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/arch/powerpc/include/asm/cpm2.h b/arch/powerpc/include/asm/cpm2.h
index f42e9ba..7c8608b 100644
--- a/arch/powerpc/include/asm/cpm2.h
+++ b
The SPUFS_CNTL_MAP_SIZE define is cut and pasted twice so we can delete
the second instance.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h
b/arch/powerpc/platforms/cell/spufs/spufs.h
index 0ba3c95..bcfd6f0 100644
--- a/arch/powerpc
or something? Is there a thread on
the list?
Just add a WARN() and fix the bug then cleanup the error handling.
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
I don't feel comfortable
patching this myself.
Please give me a Reported-by tag if you fix this.
887 goto out;
888 }
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https
and || operators which go at the end these days.
I don't really want to have a lot of checkpatch churn to convert
everything...
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
These functions were cut and paste and the tests for NULL weren't
updated properly.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c
index 61ab640..9dc5806 100644
--- a/sound/aoa/fabrics/layout.c
+++ b/sound/aoa/fabrics
, vmaddr,
313 mmu_get_tsize(mmu_virtual_psize), 0);
314 }
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
If kzalloc() returns a NULL here, we pass a NULL to
xencons_disconnect_backend() which will cause an Oops.
Also I removed the __GFP_ZERO while I was at it since kzalloc() implies
__GFP_ZERO.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers
This should pass buf to bvec_kunmap_irq() instead of bv. The api is
like kmap_atomic() instead of kmap().
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index e9da874..03688c2 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block
)
- of_scan_pci_bridge(child, dev);
+ of_scan_pci_bridge(child, dev);
The intention was probably to check child instead of dev.
pci_device_to_OF_node() can return NULL. On the other hand the code
has been this way for a year and no one has complained...
regards,
dan
applies to the similar patches in this set.
regards,
dan carpenter
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
On Sun, Aug 01, 2010 at 10:19:34AM +0400, Vasiliy Kulikov wrote:
On Sat, Jul 31, 2010 at 21:17 +0200, Dan Carpenter wrote:
On Sat, Jul 31, 2010 at 09:38:20PM +0400, Kulikov Vasiliy wrote:
create_proc_read_entry() may fail, if so return -ENOMEM.
It can fail, but also we return NULL
101 - 162 of 162 matches
Mail list logo