Message ID | 20170207145225.31228-1-weiyj.lk@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Feb 07 2017 or thereabouts, Wei Yongjun wrote: > From: Wei Yongjun <weiyongjun1@huawei.com> > > Fix to return error code -ENOMEM from the devm_kzalloc() error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions > from probe") > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > --- Good catch. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> > drivers/input/rmi4/rmi_driver.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c > index bf5c36e..0c54446 100644 > --- a/drivers/input/rmi4/rmi_driver.c > +++ b/drivers/input/rmi4/rmi_driver.c > @@ -1049,7 +1049,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) > data->irq_memory = devm_kzalloc(dev, size * 4, GFP_KERNEL); > if (!data->irq_memory) { > dev_err(dev, "Failed to allocate memory for irq masks.\n"); > - return retval; > + return -ENOMEM; > } > > data->irq_status = data->irq_memory + size * 0; > -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Feb 07, 2017 at 04:00:37PM +0100, Benjamin Tissoires wrote: > On Feb 07 2017 or thereabouts, Wei Yongjun wrote: > > From: Wei Yongjun <weiyongjun1@huawei.com> > > > > Fix to return error code -ENOMEM from the devm_kzalloc() error handling > > case instead of 0, as done elsewhere in this function. > > > > Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions > > from probe") > > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > > --- > > Good catch. > > Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Applied, thank you. > > > drivers/input/rmi4/rmi_driver.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c > > index bf5c36e..0c54446 100644 > > --- a/drivers/input/rmi4/rmi_driver.c > > +++ b/drivers/input/rmi4/rmi_driver.c > > @@ -1049,7 +1049,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) > > data->irq_memory = devm_kzalloc(dev, size * 4, GFP_KERNEL); > > if (!data->irq_memory) { > > dev_err(dev, "Failed to allocate memory for irq masks.\n"); > > - return retval; > > + return -ENOMEM; > > } > > > > data->irq_status = data->irq_memory + size * 0; > >
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index bf5c36e..0c54446 100644 --- a/drivers/input/rmi4/rmi_driver.c +++ b/drivers/input/rmi4/rmi_driver.c @@ -1049,7 +1049,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) data->irq_memory = devm_kzalloc(dev, size * 4, GFP_KERNEL); if (!data->irq_memory) { dev_err(dev, "Failed to allocate memory for irq masks.\n"); - return retval; + return -ENOMEM; } data->irq_status = data->irq_memory + size * 0;