<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">在 2025/2/20 17:12, Maxime Ripard 写道:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20250220-tiny-pragmatic-pug-5addfc@houat">
      <pre class="moz-quote-pre" wrap="">On Thu, Feb 20, 2025 at 04:53:58PM +0800, <a class="moz-txt-link-abbreviated" href="mailto:oushixiong1025@163.com">oushixiong1025@163.com</a> wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">From: Shixiong Ou <a class="moz-txt-link-rfc2396E" href="mailto:oushixiong@kylinos.cn"><oushixiong@kylinos.cn></a>

[WHY] If the call to sysfs_create_group() fails, there is
      no need to call function sysfs_remove_group().

[HOW] Add a condition check before removing sysfs attribute.

Signed-off-by: Shixiong Ou <a class="moz-txt-link-rfc2396E" href="mailto:oushixiong@kylinos.cn"><oushixiong@kylinos.cn></a>
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
What are you trying to fix exactly? AFAIK, there's no code path that
calls komeda_dev_destroy() after komeda_dev_create() has failed.

Maxime
</pre>
    </blockquote>
    <pre style="padding: 0px; margin: 0px; color: rgb(0, 0, 0); font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><code>if calling </code><code><code>sysfs_create_group() fails, it will go to lable 'err_cleanup:', and it will call </code>komeda_dev_destroy() laterly.

thanks,
Shixiong Ou.
</code></pre>
    <p></p>
  </body>
</html>