Skip to content

Commit fe976c4

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
sh: superhyway: Simplify check in remove callback
The driver core only calls a remove callback when the device was successfully bound (aka probed) before. So dev->driver is never NULL. (And even if it was NULL, to_superhyway_driver(NULL) isn't ...) Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f52c9cc commit fe976c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/sh/superhyway/superhyway.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static void superhyway_device_remove(struct device *dev)
155155
struct superhyway_device *shyway_dev = to_superhyway_device(dev);
156156
struct superhyway_driver *shyway_drv = to_superhyway_driver(dev->driver);
157157

158-
if (shyway_drv && shyway_drv->remove)
158+
if (shyway_drv->remove)
159159
shyway_drv->remove(shyway_dev);
160160
}
161161

0 commit comments

Comments
 (0)