On Wed, Apr 12, 2023 at 05:07:21PM +0200, Uwe Kleine-König wrote:
> On Fri, Dec 30, 2022 at 01:44:31PM +0100, Uwe Kleine-König wrote:
> > For both variants (platform and i2c driver) after a successful bind
> > (i.e. .probe completed without error) driver data is set to a non-NULL
> > value.
> >
> > So the return value of i2c_get_clientdata and dev_get_drvdata
> > respectively are not NULL and so the if blocks are never executed. (And
> > if you fear they might, they shouldn't return silently and yield a
> > resource leak.)
> >
> > Signed-off-by: Uwe Kleine-König <[email protected]>
>
> This patch waits for feedback now for > 3 month. Is this still on
> someone's todo list?
I apologise, this got lost. It's queued for next merge window.
Thank you,
-corey
>
> Best regards
> Uwe
>
> > ---
> > drivers/char/ipmi/ipmi_ssif.c | 6 ------
> > 1 file changed, 6 deletions(-)
> >
> > diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
> > index 4bfd1e306616..a0090ea54e48 100644
> > --- a/drivers/char/ipmi/ipmi_ssif.c
> > +++ b/drivers/char/ipmi/ipmi_ssif.c
> > @@ -1286,9 +1286,6 @@ static void ssif_remove(struct i2c_client *client)
> > struct ssif_info *ssif_info = i2c_get_clientdata(client);
> > struct ssif_addr_info *addr_info;
> >
> > - if (!ssif_info)
> > - return;
> > -
> > /*
> > * After this point, we won't deliver anything asychronously
> > * to the message handler. We can unregister ourself.
> > @@ -2074,9 +2071,6 @@ static int ssif_platform_remove(struct
> > platform_device *dev)
> > {
> > struct ssif_addr_info *addr_info = dev_get_drvdata(&dev->dev);
> >
> > - if (!addr_info)
> > - return 0;
> > -
> > mutex_lock(&ssif_infos_mutex);
> > list_del(&addr_info->link);
> > kfree(addr_info);
> > --
> > 2.38.1
> >
> >
> >
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | https://www.pengutronix.de/ |
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer