[patch] i2c: off by one issue

2010-04-07 Thread Dan Carpenter
If we don't find the correct rate, we want to end the loop with i pointing to the last element in the array. Signed-off-by: Dan Carpenter erro...@gmail.com --- I will be offline for a while, sorry if I delay replying. diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c

Re: [PATCH RESEND v2] i2c-eg20t: support new device OKI SEMICONDUCTOR ML7213 IOH

2011-02-28 Thread Dan Carpenter
to name goto destinations after the destination instead of the starting point. In this case, we have two gotos to one destination and the label err_request_irq makes no sense. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message

Re: [patch] i2c-scmi: remove some bogus NULL checks

2013-10-30 Thread Dan Carpenter
worth cleaning. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

re: i2c: pxa: add OF support

2013-11-06 Thread Dan Carpenter
the unwind needs to be fixed so it's a mirror reflection of the allocation order. Also the labels are crap. Label names should be based on the label location and not the goto location(s). 1273 return ret; 1274 } regards, dan carpenter -- To unsubscribe from this list: send the line

re: i2c: nomadik: Convert to devm functions

2014-04-02 Thread Dan Carpenter
ret = -ENOMEM; 1004 goto err_no_mem; 1005 } 1006 1007 dev-irq = adev-irq[0]; regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More

[patch] i2c: qup: off by ones in qup_i2c_probe()

2014-04-03 Thread Dan Carpenter
These should = ARRAY_SIZE() instead of ARRAY_SIZE(). Fixes: 10c5a8425968 ('i2c: qup: New bus driver for the Qualcomm QUP I2C controller') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index c9d5f78..ee40980 100644

[iio:testing 25/25] drivers/iio/magnetometer/ak09911.c:301 ak09911_probe() error: we previously assumed 'id' could be null (see line 288)

2014-06-16 Thread Dan Carpenter
ak09911_probe() is called from i2c_device_probe() when we do: status = driver-probe(client, i2c_match_id(driver-id_table, client)); The functions which implement driver-probe() are not very consistent in how the check for a NULL return from i2c_match_id(). tree:

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Dan Carpenter
); + module_put(port-ops-owner); + + return NULL; +} + regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Dan Carpenter
, + int (*pf)(void *), void (*kf)(void *), + void (*irq_func)(void *), int flags, + void *handle, struct parport_driver *drv) The difference between parport_register_device() and parport_register_dev() isn't clear from the name. regards, dan carpenter

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Dan Carpenter
will always be true. The question of how to handle impossible conditions is always tricky. :P In this case just remove the condition. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Dan Carpenter
callback of parport device. That doesn't work. Some of the callers pass a string literal. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-i2c in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 01/14] parport: return value of attach and parport_register_driver

2015-04-08 Thread Dan Carpenter
On Wed, Apr 08, 2015 at 02:38:32PM +0300, Dan Carpenter wrote: 1) We can't apply this patch on its own so this way of breaking up the patches doesn't work. The right thing is to do add an attach_ret(). static int do_attach(drv) { if (drv-attach_ret) return drv

Re: [PATCH 01/14] parport: return value of attach and parport_register_driver

2015-04-08 Thread Dan Carpenter
On Wed, Apr 08, 2015 at 05:20:10PM +0530, Sudip Mukherjee wrote: On Wed, Apr 08, 2015 at 02:38:32PM +0300, Dan Carpenter wrote: 1) We can't apply this patch on its own so this way of breaking up the patches doesn't work. yes, if the first patch is reverted for any reason all the others need

[patch] i2c: xgene-slimpro: dma_mapping_error() doesn't return an error code

2015-08-18 Thread Dan Carpenter
The dma_mapping_error() function returns true if there is an error, it doesn't return an error code. We should return -ENOMEM. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/i2c/busses/i2c-xgene-slimpro.c b/drivers/i2c/busses/i2c-xgene-slimpro.c index 1c9cb65a