Skip to content

Commit

Permalink
[S390] cio: observe chpid valid flag
Browse files Browse the repository at this point in the history
Check validity flag of CHPID description data before continuing with
channel-path initialization.

Signed-off-by: Peter Oberparleiter <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
oberpar authored and Martin Schwidefsky committed Apr 27, 2007
1 parent e6b6e10 commit c9182e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/s390/cio/chp.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,10 @@ int chp_new(struct chp_id chpid)
ret = chsc_determine_channel_path_description(chpid, &chp->desc);
if (ret)
goto out_free;
if ((chp->desc.flags & 0x80) == 0) {
ret = -ENODEV;
goto out_free;
}
/* Get channel-measurement characteristics. */
if (css_characteristics_avail && css_chsc_characteristics.scmc
&& css_chsc_characteristics.secm) {
Expand Down

0 comments on commit c9182e0

Please sign in to comment.