linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/1] xilinx: check return value of class_create
       [not found] <1470816502-16802-1-git-send-email-yizhouzhou@ict.ac.cn>
@ 2016-08-10  9:29 ` Michal Simek
  0 siblings, 0 replies; only message in thread
From: Michal Simek @ 2016-08-10  9:29 UTC (permalink / raw)
  To: yizhouzhou, michal.simek, soren.brinkmann, linux-arm-kernel,
	linux-kernel
  Cc: Zhouyi Zhou

On 10.8.2016 10:08, yizhouzhou@ict.ac.cn wrote:
> From: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
> 
> 	 return value of class_create should be considered in
> module init function.
> 
> Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
> ---
>  drivers/char/xilinx_hwicap/xilinx_hwicap.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
> index c07dfe5..3877b46 100644
> --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
> +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
> @@ -854,6 +854,9 @@ static int __init hwicap_module_init(void)
>  	int retval;
>  
>  	icap_class = class_create(THIS_MODULE, "xilinx_config");
> +	if (IS_ERR(icap_class))
> +		return PTR_ERR(icap_class);
> +
>  	mutex_init(&icap_sem);
>  
>  	devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR);
> 

Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-10 20:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1470816502-16802-1-git-send-email-yizhouzhou@ict.ac.cn>
2016-08-10  9:29 ` [PATCH 1/1] xilinx: check return value of class_create Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).