lkml.org 
[lkml]   [2023]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] misc/pvpanic: deduplicate comomn code
On Wed, Oct 11, 2023 at 12:10:08AM +0200, Thomas Weißschuh wrote:
> +int devm_pvpanic_probe(struct device *dev, void __iomem *base)
> +{
> + struct pvpanic_instance *pi;
> + int ret;
> +
> + if (!base)
> + return -EINVAL;
> +
> + ret = devm_device_add_groups(dev, pvpanic_dev_groups);

You just raced with userspace and lost :(

Please just use the default groups attribute pointer, you should NEVER
need to manually add groups to a device like this.

And why are you calling this devm_*() for a probe function? That's
risky as you are now in the global namespace and this really is not a
devm_*() like function

thanks,

greg k-h

\
 
 \ /
  Last update: 2023-10-11 08:33    [W:0.043 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site