[patch] of: check for IS_ERR()

2010-02-26 Thread Dan Carpenter
get_phy_device() can return an ERR_PTR() Signed-off-by: Dan Carpenter erro...@gmail.com --- I don't have a cross compile environment set up so I can't even compile test this. :/ But err.h is included so it should be OK. diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 18ecae4

Re: [patch] of: check for IS_ERR()

2010-03-29 Thread Dan Carpenter
On Fri, Feb 26, 2010 at 01:54:20AM -0800, David Miller wrote: From: Dan Carpenter erro...@gmail.com Date: Fri, 26 Feb 2010 12:49:41 +0300 get_phy_device() can return an ERR_PTR() Signed-off-by: Dan Carpenter erro...@gmail.com --- I don't have a cross compile environment set up so I

[patch v2] nouveau: unwind on load errors

2010-07-30 Thread Dan Carpenter
nuveau_load() just returned directly if there was an error instead of releasing resources. Signed-off-by: Dan Carpenter erro

[patch] ehci-ppc-of: problems in unwind

2010-08-14 Thread Dan Carpenter
: Workaround for the PPC440EPX USBH_23 errata [take 3] I modified the few lines in front a little so that my code didn't obscure the return success code path. Signed-off-by: Dan Carpenter erro...@gmail.com --- I don't have a cross compile environment set up so I haven't compiled this code. Sorry

[patch] qla2xxx: locking problem in qla2x00_init_rings()

2010-09-12 Thread Dan Carpenter
IRQs are already disabled here so we don't need to disable them again. But more importantly, the spin_lock_irqsave() overwrites flags and that breaks things when we want to re-enable the IRQs when we call spin_unlock_irqrestore(ha-hardware_lock, flags); Signed-off-by: Dan Carpenter erro

[patch] sata_mv: silence an uninitialized variable warning

2012-03-27 Thread Dan Carpenter
Gcc version 4.6.2-12 complains that if we can't find the nr-ports property in of_property_read_u32_array() then n_ports is used uninitialized. Let's set it to zero in that case. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c

[patch] max17042_battery: fix a couple buffer overflows

2012-03-27 Thread Dan Carpenter
-by: Dan Carpenter dan.carpen...@oracle.com --- I don't have this hardware. The original code is clearly buggy, but I can't test that my fix is correct. Please review carefully. diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c index e36763a..f8cd48c 100644 --- a/drivers

Re: [PATCH V1 1/2] staging: iio: add driver for isl29028

2012-04-11 Thread Dan Carpenter
On Wed, Apr 11, 2012 at 10:58:03PM +0530, Laxman Dewangan wrote: Intersil's ISL29028 is concurrent Ambient Light and Proximity Sensor device. Add driver to access the light and IR intensity and proximity value via iio interface. Signed-off-by: Laxman Dewangan ldewan...@nvidia.com ---

Re: [PATCH V2 1/2] staging: iio: add driver for isl29028

2012-04-12 Thread Dan Carpenter
--- Taken care of all review comment from Dan. Looks nice. You went above and beyond and cleaned up a couple things I didn't mention. Thanks. regards, dan carpenter ___ devicetree-discuss mailing list devicetree-discuss@lists.ozlabs.org https

re: mfd: mc13xxx: add codec platform data

2012-05-21 Thread Dan Carpenter
, sizeof(*pdata-codec)); New dereference. 696 697 if (mc13xxx-flags MC13XXX_USE_RTC) regards, dan carpenter ___ devicetree-discuss mailing list devicetree-discuss

re: regulator: tps65217: Add device tree support

2012-07-13 Thread Dan Carpenter
(*reg_data)); regards, dan carpenter ___ devicetree-discuss mailing list devicetree-discuss@lists.ozlabs.org https://lists.ozlabs.org/listinfo/devicetree-discuss

[patch] driver-core: dev_to_node() should handle NULL pointers

2012-07-20 Thread Dan Carpenter
What prompted this patch is that in dma_pool_create() we call dev_to_node() before checking whether dev is NULL. It looks like there are places which call dma_pool_create() with a NULL pointer. An example is in drivers/usb/gadget/amd5536udc.c. Signed-off-by: Dan Carpenter dan.carpen

Re: [patch] driver-core: dev_to_node() should handle NULL pointers

2012-07-20 Thread Dan Carpenter
On Fri, Jul 20, 2012 at 08:00:42AM -0700, Greg Kroah-Hartman wrote: On Fri, Jul 20, 2012 at 09:56:23AM +0300, Dan Carpenter wrote: What prompted this patch is that in dma_pool_create() we call dev_to_node() before checking whether dev is NULL. It looks like there are places which call

[patch] video: mb862xxfb: prevent divide by zero bug

2012-08-18 Thread Dan Carpenter
Do a sanity check on these before using them as divisors. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/video/mb862xx/mb862xxfbdrv.c b/drivers/video/mb862xx/mb862xxfbdrv.c index 00ce1f3..57d940b 100644 --- a/drivers/video/mb862xx/mb862xxfbdrv.c +++ b/drivers/video

[patch] usb: phy: signedness bug in suspend/resume

2012-09-14 Thread Dan Carpenter
ret should be signed here for the error handling to work. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c index 15ab3d6..d36c282 100644 --- a/drivers/usb/phy/omap-usb2.c +++ b/drivers/usb/phy/omap-usb2.c @@ -120,7

re: spi-gpio: allow operation without CS signal

2012-10-03 Thread Dan Carpenter
that it's supposed to be used as a void pointer but that doesn't make a lot of sense either. 230 /* SPI is normally active-low */ 231 gpio_set_value(cs, (spi-mode SPI_CS_HIGH) ? is_active : !is_active); 232 } regards, dan carpenter

[patch] tg3: missing break statement in tg3_get_5720_nvram_info()

2013-01-11 Thread Dan Carpenter
There is a missing break statement so FLASH_5762_EEPROM_HD gets treated like FLASH_5762_EEPROM_LD. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Only needed in linux-next. diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index bc4d989..642764e

[patch] hwmon/max6697: fix memset size in max6697_init_chip()

2013-01-14 Thread Dan Carpenter
sizeof(p) was intended instead of sizeof(data). data is a pointer and p is a 7 character struct. It probably doesn't make a difference most of the time, but it could result in using uninitialized data. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/hwmon/max6697.c b

[patch] ALSA: ASoC: tas5086: signedness bug in tas5086_hw_params()

2013-03-12 Thread Dan Carpenter
val has to be signed for the error handling to work. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c index 008bea4..41d03ae 100644 --- a/sound/soc/codecs/tas5086.c +++ b/sound/soc/codecs/tas5086.c @@ -251,7 +251,7

[patch] mtd: denali_dt: harmless case of testing the wrong variable

2013-04-01 Thread Dan Carpenter
There is a warning message that can't be printed because we test the wrong variable. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c index 546f8cb..02988b0 100644 --- a/drivers/mtd/nand/denali_dt.c +++ b/drivers/mtd

[patch -next] net: calxedaxgmac: fix condition in xgmac_set_features()

2013-04-25 Thread Dan Carpenter
The changed variable should be a 64 bit type, otherwise it can't store all the features. The way the code is now the test for whether NETIF_F_RXCSUM changed is always false and we return immediately. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/net/ethernet/calxeda

re: regulator: palma: add ramp delay support through regulator constraints

2013-04-29 Thread Dan Carpenter
addr = palmas_regs_info[id].tstep_addr; 848 ret = palmas_smps_read(pmic-palmas, addr, reg); 849 if (ret 0) { regards, dan carpenter ___ devicetree-discuss mailing list devicetree-discuss

[patch -next] spi: spi-xilinx: cleanup a check in xilinx_spi_txrx_bufs()

2013-06-09 Thread Dan Carpenter
negative may cause a bug, but I don't have the hardware and can't test. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index 0b8398c..fb56fcf 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c @@ -301,7 +301,7

[patch] spi/xilinx: signedness issue checking platform_get_irq()

2013-07-17 Thread Dan Carpenter
xspi-irq is unsigned int so it's never less than zero. I have added a cast. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index fea815c..e5201fb 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c

Re: [patch] spi/xilinx: signedness issue checking platform_get_irq()

2013-07-17 Thread Dan Carpenter
On Wed, Jul 17, 2013 at 09:03:53AM -0600, Stephen Warren wrote: On 07/17/2013 06:26 AM, Dan Carpenter wrote: xspi-irq is unsigned int so it's never less than zero. I have added a cast. Um. Doesn't this just hide a warning, not solve the problem? If the value can't be negative, so

[patch v2] spi/xilinx: signedness issue checking platform_get_irq()

2013-07-17 Thread Dan Carpenter
In xilinx_spi_probe() we use xspi-irq to store negative error codes so it has to be signed. We weren't going to use the upper bit any way so this is fine. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: The first version introduced an ugly cast. Sorry for that. diff --git