mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
char: xilinx_hwicap: Drop if block with always false condition
hwicap_drv_remove() is only called for a device after hwicap_drv_probe() returned 0. In that case dev_set_drvdata() was called (by hwicap_setup()) with a non-NULL value and so dev_get_drvdata() won't return NULL. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Michal Simek <[email protected]> Message-ID: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e8989a48ca
commit
3d82dca0f2
@@ -810,8 +810,6 @@ static int hwicap_drv_remove(struct platform_device *pdev)
|
||||
struct hwicap_drvdata *drvdata;
|
||||
|
||||
drvdata = dev_get_drvdata(dev);
|
||||
if (!drvdata)
|
||||
return 0;
|
||||
|
||||
device_destroy(icap_class, drvdata->devt);
|
||||
cdev_del(&drvdata->cdev);
|
||||
|
||||
Reference in New Issue
Block a user