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
diff --git a/drivers/i2c/busses/i2c-xgene-slimpro.c
b/drivers/i2c/busses/i2c-xgene-slimpro.c
index 1c9cb65a..4233f56 100644
--- a/dr
etails).
> it will be done in free_port() the release 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.
he condition 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..
tween parport_register_device() and
parport_register_dev() isn't clear from the name.
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
ce = parport_default_timeslice;
> + tmp->waitnext = NULL;
> + tmp->waitprev = NULL;
> +
> + /*
> + * This has to be run as last thing since init_state may need other
> + * pardevice fields. -arca
> + */
> + port->ops->init_state(tmp, tmp->stat
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 f
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)
y much. But I can also see
your point. Hm...
Minor comment: No need to preserve the error code if there are lots
which we miss. We may as well hard code an error code. But that's a
minor thing. Does this actually simplify the driver code? That's the
more important thing.
r
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: git://git.kernel.org
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
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index c9d5f
returns a NULL on error the same as ioremap() does.
1003 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 li
^^^
Null dereferences.
Obviously 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 un
ch was that some compilers assume pointer math
can't overflow and my checker was complaining. We use
-fno-strict-overflow in the kernel, but it still seemed 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
"obj" can't be NULL here.
We already know that "pkg->package.elements" gives us a valid pointer
so the next pointer after that is also non-NULL.
Signed-off-by: Dan Carpenter
diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c
index c447e8d..
I think goto err_request_irq was intended here. On a side note, it's
always better 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 un
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
---
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.
16 matches
Mail list logo