Re: [PATCH] staging: panel: remove duplicate code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 07, 2015 at 01:55:01PM +0530, Sudip Mukherjee wrote:
> both the misc_deregister(), parport_release() and
> parport_unregister_device() is there in the module_exit function also.
> detach is called from parport_unregister_driver() and by the time
> detach executes misc_deregister(), parport_release() and
> parport_unregister_device() has already executed marking
> keypad_initialized and lcd.initialized  as false. so this part of the
> code will never execute.
> 
> Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

A better subject might have been "remove dead code" but that was
explained pretty well in the patch desription.

I hadn't looked at this driver much before.  It sucks that
parport_driver ->attach() functions can't fail...  I think we don't
need the "keypad_initialized" and "lcd.initialized" variables because
"if (pprt)" is enough to tell us whether or not the attach function
succeeded.

TODO: Staging: panel: remove some redundent variables.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux