[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1d3c1df9-42b8-e451-f622-32d8c1e6d1b5@linux.intel.com>
Date: Wed, 29 Dec 2021 15:49:29 +0200
From: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To: Jonathan Cameron <jic23@...nel.org>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: William Breathitt Gray <vilhelm.gray@...il.com>,
Lars-Peter Clausen <lars@...afoo.de>, kernel@...gutronix.de,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-iio@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 13/23] counter: Provide alternative counter
registration functions
On 12/28/21 20:00, Jonathan Cameron wrote:
> On Mon, 27 Dec 2021 10:45:16 +0100
> Uwe Kleine-König <u.kleine-koenig@...gutronix.de> wrote:
>> + if (err < 0)
>> + goto err_chrdev_add;
>> +
>> + device_initialize(dev);
>> + /* Configure device structure for Counter */
>> + dev->type = &counter_device_type;
>> + dev->bus = &counter_bus_type;
>> + dev->devt = MKDEV(MAJOR(counter_devt), id);
>
> As 0-day pointed out id not initialized.
>
This was the reason why second counter instance initialization failed
for me when testing the patch 17. I fixed it locally by changing the
line a few rows above the MKDEV():
- dev->id = err;
+ dev->id = id = err;
Powered by blists - more mailing lists