Thread (7 messages) 7 messages, 2 authors, 2021-09-10

Re: [PATCH v5 3/3] Input: ads7846: Switch to devm initialization

flat view

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2021-09-10 04:29:29

Hi Daniel,

On Tue, Sep 07, 2021 at 10:07:26PM +0200, Daniel Mack wrote:
quoted hunk ↗ jump to hunk
@@ -1392,7 +1392,7 @@ static int ads7846_probe(struct spi_device *spi)
 
 	err = sysfs_create_group(&dev->kobj, &ads784x_attr_group);
 	if (err)
-		goto err_remove_hwmon;
+		return err;
There is devm_device_add_group() that does what is needed.

Also setting up input device's parent is no longer needed when
devm_input_allocate_device() is used.

I adjusted both, and applied, thank you.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help