public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Leann Ogasawara <ogasawara@osdl.org>
Cc: linux-kernel@vger.kernel.org, Hanna Linder <hannal@us.ibm.com>,
	faith@valinux.com
Subject: Re: [Dri-devel][PATCH] sysfs simple class support for DRI char device
Date: Thu, 11 Mar 2004 10:52:21 -0800	[thread overview]
Message-ID: <20040311185221.GA20223@kroah.com> (raw)
In-Reply-To: <1078517655.29095.32.camel@ibm-d.pdx.osdl.net>

On Fri, Mar 05, 2004 at 12:14:15PM -0800, Leann Ogasawara wrote:
> Hi All,
> 
> Patch adds sysfs simple class support for DRI character device (Major
> 226).  Also, adds some error checking.  Feedback appreciated.  Thanks,

Looks good, but...

>  
>  	DRM_DEBUG("\n");
> -	if (register_chrdev(DRM_MAJOR, "drm", &DRM(stub_fops)))
> +	ret1 = register_chrdev(DRM_MAJOR, "drm", &DRM(stub_fops));
> +	if (!ret1) {
> +		drm_class = class_simple_create(THIS_MODULE, "drm");
> +		if (IS_ERR(drm_class)) {
> +			printk (KERN_ERR "Error creating drm class.\n");
> +			unregister_chrdev(DRM_MAJOR, "drm");
> +			return PTR_ERR(drm_class);
> +		}
> +	}
> +	else if (ret1 == -EBUSY)
>  		i = (struct drm_stub_info *)inter_module_get("drm");
> +	else
> +		return -1;

If ret1 == -EBUSY then we never create the "drm" class_simple structure,
right?  That's not good.

Care to fix this up and send a new patch?

thanks,

greg k-h

  reply	other threads:[~2004-03-11 21:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-05 20:14 [Dri-devel][PATCH] sysfs simple class support for DRI char device Leann Ogasawara
2004-03-11 18:52 ` Greg KH [this message]
2004-03-12  0:34   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040311185221.GA20223@kroah.com \
    --to=greg@kroah.com \
    --cc=faith@valinux.com \
    --cc=hannal@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ogasawara@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox