Re: [PATCH v2] staging: media: atomisp: remove debug sysfs attributes active_bo and free_bo

From: Dan Carpenter
Date: Tue Jun 24 2025 - 13:33:06 EST


On Tue, Jun 24, 2025 at 07:51:10PM +0300, Abdelrahman Fekry wrote:
> On Tue, Jun 24, 2025 at 7:31 PM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> >
> > On Tue, Jun 24, 2025 at 05:49:43PM +0300, Abdelrahman Fekry wrote:
> > > int hmm_init(void)
> > > {
> > > int ret;
> > > @@ -130,14 +48,6 @@ int hmm_init(void)
> > > */
> > > dummy_ptr = hmm_alloc(1);
> > >
> > > - if (!ret) {
> > > - ret = sysfs_create_group(&atomisp_dev->kobj,
> > > - atomisp_attribute_group);
> > > - if (ret)
> > > - dev_err(atomisp_dev,
> > > - "%s Failed to create sysfs\n", __func__);
> > > - }
> > > -
> > > return ret;
> >
> >
> > It's really unclear how this "return ret;" is supposed to work. Was
> > that part of the sysfs_create_group()?
> >
> yes , but still it can be set by hmm_bo_device_init so even after removing
> sysfs_create_group , ret value depends on another function.
>

You're in too big of a hurry. Wait for a day between resending patches.
I have looked at this some more and it turns out that nothing checks the
error code so the "return ret;" doesn't work. What do you think we
should do?

regards,
dan carpenter