Skip to content

Commit 3d82dca

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
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 <u.kleine-koenig@pengutronix.de> Acked-by: Michal Simek <michal.simek@amd.com> Message-ID: <20230605092047.50472-2-u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e8989a4 commit 3d82dca

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/char/xilinx_hwicap/xilinx_hwicap.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,6 @@ static int hwicap_drv_remove(struct platform_device *pdev)
810810
struct hwicap_drvdata *drvdata;
811811

812812
drvdata = dev_get_drvdata(dev);
813-
if (!drvdata)
814-
return 0;
815813

816814
device_destroy(icap_class, drvdata->devt);
817815
cdev_del(&drvdata->cdev);

0 commit comments

Comments
 (0)